web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Show a form depending ...
Power Apps
Answered

Show a form depending on the gallery

(0) ShareShare
ReportReport
Posted on by 909

Hello,

 

I have two galleries with different filters both show same data source, but narrowed down to the status of record.

From the first gallery it is possible to show details of gallery which open up a form.

 

Form properties ITEM:

 

LookUp(IdeaBox_1,'Identyfikator (ID)'= Gallery2_1.Selected.'Identyfikator (ID)')

 

Is it possible to use this form for another gallery? So item data would be dynamic depending on the gallery I select?

 

Can Power Apps handle something like that:

If navigated from Screen X item property Gallery2_1.Selected

If navigated from Screen Y Item property Gallery3

 

or should I just duplicate a form screen and change property in it.

Which would be more efficient?

Galleries are on different screens.

Categories:
  • AllanDeCastro Profile Picture
    412 Most Valuable Professional on at

    Hello,

     

    In this specific case, I recommend to use variable instead of LookUp in the form.

    You can set a variable on the OnSelect event of the gallery just before navigating to the next screen and use this variable as an item.
    So, you can set this variable from the two galleries !

     

     

    Hope it helps!
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Verified answer
    eka24 Profile Picture
    20,925 on at

    Onvisible of your screen:

    UpdateContext({ChangeGal:!ChangeGal})

    Then On your Screen, insert a button that when clicked, will change from one Gallery to the other:

    So Onselect of the button:

    If(ChangeGal,

    LookUp(IdeaBox_1,'Identyfikator (ID)'= Gallery2_1.Selected.'Identyfikator (ID)'),

    LookUp(IdeaBox_1,'Identyfikator (ID)'= Gallery3.Selected.'Identyfikator (ID)'))

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • Elitezone Profile Picture
    909 on at

    @eka24 

    When I tried using UpdateContext on one screen this variable was not visible on other screen. I couldn't use it it showed Name is not recognized.

    I did it like that:

     

     

    Set(varAllExceptArchive,true)

     

    and then in form:

     

     

    If(varAllExceptArchive,
    
    LookUp(IdeaBox_1,'Identyfikator (ID)'= Gallery2_1.Selected.'Identyfikator (ID)'),
    
    LookUp(IdeaBox_1,'Identyfikator (ID)'= Gallery2_3.Selected.'Identyfikator (ID)'))

     

     

    I hope it is OK. It works well.

     

  • eka24 Profile Picture
    20,925 on at

    That is ok.

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard