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 Apps
Unanswered

Issue in Power FX

(0) ShareShare
ReportReport
Posted on by 18

Hi Team,

I am working on a power App project where I have 2 screens one for gallery control and other screen for adding new data. In the vertical gallery I have 4 fields Age, Name ,Group and Gender When I click on a button it should show the relevant data of the selected gallery record in the next screen that too in view mode (In 2nd screen I am using only text label controls and dropdown control not instead of form) and there is Add button in the gallery screen when I click that it should give option for new data entry in the 2nd screen where we are viewing the selected record from the gallery screen. Please give some solutions All suggestions are welcome thank you in advance!!

Regards,

Anony_mous  

Categories:
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @Anony_mous 

     

    To pass the data from the selected gallery item to the next screen, you can use the Navigate function with a context variable. For example, you can set the OnSelect property of the gallery to:

    Navigate(Screen2, ScreenTransition.None, {SelectedRecord: ThisItem})

    This will navigate to Screen2 and store the selected item in the context variable SelectedRecord. Then, on Screen2, you can use the SelectedRecord variable to display the relevant data in your text labels and dropdown control. For example, you can set the Text property of a label to:

    SelectedRecord.Name

    This will show the name of the selected item from the gallery.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Anony_mous Profile Picture
    18 on at

    Hi,

    Thanks for the reply in the second screen I want the fields to be used for new record as well not only for viewing the selected gallery record I am already using the text label property to enter some formula so how can I change it backSo when a button is clicked it should only view the selected gallery record and another button is clicked it should take me to new data entry in the same screen used for viewing the selected gallery record
    Regards,

    Anony_mous

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    It sounds like you want to use the same screen and gallery to display existing records and create new records in your PowerApps app. One possible way to do this is to use a variable to control the mode of the gallery, and change the variable value when you click different buttons.

     

    For example, you can set a variable called GalleryMode to either "View" or "New", and use it to determine the items and display mode of the gallery. Here is a sample code that you can try:

    • On the screen’s OnVisible property, set the variable to "View" by default: 

     

    Set(GalleryMode, "View")

     

    • On the button that shows the selected gallery record, set the variable to "View" and update the gallery items to show only the selected record: 

     

    Set(GalleryMode, "View"); 
    UpdateContext({SelectedRecord: Gallery1.Selected}); 

     

    • On the Gallery2.Items

     

    SelectedRecord​

     

    • On the button that creates a new record, set the variable to "New" and update the gallery items to show a blank record: 

     

    Set(GalleryMode, "New"); 
    UpdateContext({SelectedRecord: Blank()}); 

     

    • On the gallery’s DisplayMode property, use the variable to switch between View and Edit modes: 

     

    If(GalleryMode = "View", DisplayMode.View, DisplayMode.Edit)

     

     

    I hope this help.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • Anony_mous Profile Picture
    18 on at

    Hi,

    I tried with the solution sent it is working for text label controls but not working for combo box dropdown controls please give some solutions all suggestions are welcome thank you in advance!!

    Regards,

    Anony_mous

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @Anony_mous 

     

    Please change the .DisplayMode of all the controls in your gallery to:

    Parent.DisplayMode

     

    All controls will adapt to the changes of the gallery. 

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 236 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard