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 / Setting Default Values...
Power Apps
Unanswered

Setting Default Values based on the previous gallery selection for a Drop Down in a New Form

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

 

I am creating an app where one of my teammates can click a project and view or add open action items. I am having trouble passing the "Project" and "Sub Project" values to the drop downs in the New Form. My data source is a SharePoint list and the drop downs read as Choices([@'SharepointList'].Projects). 

 

How do I pass the values from the previous gallery into those drop downs?

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 
    Put this code in the Text property of a label as a Test and see if the value selected on the previous screen is showing.

    Gallery1.Selected.Projects.Value

     

    If the above code works, put this code into the Default property and it should work.

    Gallery1.Selected.Projects

     

    ---
    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."

  • eka24 Profile Picture
    20,925 on at

    You can set a variable OnVisible of the Screen:
    Set(MyItem,GalleryName.Selected.Project)

     

    Then in your droddown Default put: MyItem

     

    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.

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    So it isn't a label. This is a dropdown part of a new form.

  • mdevaney Profile Picture
    29,993 Moderator on at

    @Anonymous 
    I'm aware it is not a label.  I simply recommended you put it in a label to test and make sure the value is coming through.

     

    Then you can apply the code I supplied to the dropdown. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It is showing in the label, but it will only show for the first gallery. So basically I have two sharepoint lists and the value i'm trying to pass is a lookup value in list 2 from list 1. The first gallery is connected to sharepoint list 1 and the second gallery is connected to sharepoint list 2. 

     

     

  • mdevaney Profile Picture
    29,993 Moderator on at
    @Anonymous
    I think it would help my understanding if you could share a sample of the SharePoint lists and provide an example of what the output should be.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yea. So there is a bigger issue. The gallery isn't filtering for whatever reason and thus will not pass the value. The 1st Gallery is one sharepoint list and the 2nd gallery is another. I'm trying to filter the 2nd Gallery based on a selected value in the 2nd sharepoint list that is a look up column.

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard