Skip to main content

Notifications

Power Apps - Power Apps Experimental Features
Suggested answer

Navigation

Posted on 26 Nov 2024 11:50:54 by 2
Hello everyone,

I have a Leave Application in Power Apps that I need some assistance with (I have attached images for ease of reference).

The first image: I selected All tab and I clicked the Approved button by the right of the Annual Leave to view the Leave Details.
The second image: I selected the Pending tab without clicking anything but the Leave Details of the previous item is still showing.

What I want to achieve is being able to navigate to different tabs(All, Pending, Approved and Declined) without the previous Leave Details showing in all the tabs. For example, if I select All and click a particular leave to view the details, the details should not should show when I move to Pending tab. The Leave Details should only display when I click the leave to view its details.
  • jpespena Profile Picture
    jpespena 150 on 26 Nov 2024 at 14:01:01
    Navigation
    Hi,
     
    If it’s in a gallery that is much better because they will serve the same function to hide the Leave Details when selected. Just add the code on the OnSelect property of the button inside the gallery. 
  • Suggested answer
    DI-02101541-0 Profile Picture
    DI-02101541-0 2 on 26 Nov 2024 at 13:48:01
    Navigation
    Thank you, jpespena. However, all the  navigation (All. Pending, Approved and Declined) buttons are inside a gallery.
  • jpespena Profile Picture
    jpespena 150 on 26 Nov 2024 at 12:23:18
    Navigation
    Hi,
     
    You can use the Approved button and the navigation buttons to control the visibility of the Leave Details.
     
    On the navigation (All. Pending, Approved and Declined) buttons' OnSelect property:
    UpdateContext({ locShowDetails: false })
     
    On Approved button OnSelect property:
    UpdateContext({ locShowDetails: true })
     
    Assuming that the Leave Details is in a container, add this to the Visible property of the container:
    locShowDetails
    Otherwise add it to individual controls if they are not inside a container.
     

    If my post helped resolve your issue, please click Accept as Solution—this helps others find it more easily and marks the item as closed. If you found this or my previous reply helpful, a Like would also be appreciated!

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,129

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,797

Leaderboard

Featured topics