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 / Update Edit form based...
Power Apps
Answered

Update Edit form based of Gallery Choice

(0) ShareShare
ReportReport
Posted on by 79

I am running into an issue when I have a gallery linked to a sharepoint list, when I select that gallery it brings up an edit form to the right of the gallery.

I want to be able to update the context of that edit form to only display certain columns based off a choice within the gallery. Example

 

Gallery

Item 1 -- Sprint 1

Item 2 -- Sprint 2

Item 3 -- Sprint 3

 

Edit Form Choices

Title, Sprint, POC, Area

 

I want to be able to filter out area on the edit form if sprint 2 is selected. I have been trying an if statement within OnSuccess and Visiable of the form but nothing is working properly. Any ideas would be greatly appreciated.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @hitty08 

    Deja vu!  This was exactly where I was going on message 10 of your prior post.

     

    You need no If statements for any of this, you simply need to set the Item property of your Form to the Gallery Selected record -  yourGallery.Selected

     

     

  • hitty08 Profile Picture
    79 on at

    Randy, followed that advice to the letter. I got that portion of it working.

    This is one giant list, some items will be filled in, some wont based on the sprint. For example

     

    Sprint one will have POC, Title, Date filled in, but sprint two will have POC, Title, Date and Project type filled in. Project Type is not filled in on Sprint 0. When I use yourGallery.Selected and click on and item that has Sprint 0, Project type shows up in the edit form.

    I am trying to filter out the project type column on the edit form for any object that has sprint 0 assigned to it. So it will not show up in the edit form for the object that has sprint 0 assigned, but will show up in the object that has sprint 1 assigned to it.

     

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @hitty08 

    So in this scenario, you should simply be working with one form and set the Visible properties of the datacards you don't want to appear to false.

     

    So, for example, if in Sprint 2, you want the Project type to be shown, then set the Visible property of that datacard to:  ThisItem.SprintNumber.Value = "Sprint 2"

    This will show that datacard when the sprint is 2.  Now, you actually probably want the inverse to happen...

    !(ThisItem.SprintNumber.Value = "Sprint 1")  This will show the datacard at any time the Sprint is not Sprint 1 (so sprint 2, 3 and 4)

     

  • hitty08 Profile Picture
    79 on at

    This worked perfectly, you are the man!

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @hitty08 

    I'm just glad our last post was still fresh in my head.  With all the posts I deal with, that is actually a bit rare.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard