Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Hide and Show buttons

(1) ShareShare
ReportReport
Posted on by
Check-In and Check-out, two buttons are created for customer visit.

for a particular record, By clicking on Check-in button a confirmation alert will appear on the screen. If we click on Yes, customer will checked in and check in button will hide and check out button will be visible on the screen. and if click on No, no action is performed. 

If a customer is checked in, hide the check in button for that particular record. here gallery has multiple views. 



This process is only worked for default first record
Issue-
when i select a new record, check in button is not visible. i need this process runs for all the records
Categories:
  • Suggested answer
    Ramiz Profile Picture
    Ramiz 402 on at
    Hide and Show buttons
    Hi,

    It can be achieved by using a collection.

    First collect the item of gallery 
    Collect(
        ItemCollection,
        {
            Id: Gallery1.Selected.'value.id',
            Blocked: true
        }
    )
    OnSelect of Check In button put this code
     
    If(
        IsBlank(
            Filter(
                ItemCollection,
                Id = Gallery1.Selected.'value.id'
            )
        ),
        Collect(
            ItemCollection,
            {Id: Gallery1.Selected.'value.id'},
            {Blocked: true}
        );
    );
    UpdateIf(
            ItemCollection,
            Id = Gallery1.Selected.'value.id',
            {Blocked: false}
        )
    

    Visible property of Check In button
     
    LookUp(ItemCollection,Id = Gallery1.Selected.'value.id',Blocked)

    By defualt it will show Check In button for all as Blocked value is true that is set on Visible property. When checkin is pressed the collection Blocked value will be updated to false and the the button will hide.

    Checkout button is always true and sits behind the Check in button

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,559 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,579 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans