cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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

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?

7 REPLIES 7
Highlighted
Super User III
Super User III

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

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

Highlighted
Super User III
Super User III

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

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.

 

Highlighted
Frequent Visitor

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

Hi,

 

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

Highlighted
Super User III
Super User III

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

@Nielsen_Carrie 
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. 

Highlighted
Frequent Visitor

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

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. 

 

 

Highlighted
Super User III
Super User III

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

@Nielsen_Carrie
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.
Highlighted
Frequent Visitor

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

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.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,029)