cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
PytByt
Level 8

How to set Gallery Default Item from Dropdown control

Hi all..

 

I'm still new with powerapps, and there's so much i still nedd to learn. I already read similiar post, but nothing have common with my case,

I'm creating an app with antimainstream navigation here.

What i'm try to achieve is as follow:
1. Screen1, User pick a starting location from a dropdown control like below:
dd1.pngDD_SelectLocation
DD_SelectLocation.Items = 

Sort(Distinct(JnlNumberColl.Location, WarehouseLocationId), Result, Ascending)

 

2. Screen2, There's a Gallery which have the same items source that i need to connect from the DD_SelectLocation.
dd2.pngGallery_CurrentLoc
Gallery_CurrentLoc.Items:

Sort(Distinct(JnlNumberColl.Location, WarehouseLocationId), Result, Ascending)

 

What need to achieve is:
When user selected the starting location from DD_SelectLocation in Screen1, Then the Gallery_SelectLoc. Defaults property in Screen 2 is automatically have the same value with DD_SelectLocation.


How can i achieve this?
Please help.

 

Regards,

pytbyt

 

 

11 REPLIES 11
Community Support Team
Community Support Team

Re: How to set Gallery Default Item from Dropdown control

Hi @PytByt ,

 

The Default property of the gallery control is the item or record from the data source to be selected in the gallery when the app starts up. Please understand that the Default property could only have one record.

If this is what you mean, then please use below formula in Default property of your gallery:

 

First(Filter(Distinct(JnlNumberColl.Location, WarehouseLocationId),DD_SelectLocation.Selected.Result in Distinct(JnlNumberColl.Location, WarehouseLocationId).Result))

 

Regards,

Mona

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PytByt
Level 8

Re: How to set Gallery Default Item from Dropdown control

Hi @v-monli-msft 

Thank for your reply.

But your solution is not working for my case. 
I tried it and my gallery is still blank selected even though the dropdown is already selected.

 

Is there any work aroud for my case here?
Please help..

 

Regards,

pytbyt

Community Support Team
Community Support Team

Re: How to set Gallery Default Item from Dropdown control

Hi @PytByt ,

 

Just noticed one thing, you said in Screen2 the gallery's name is Gallery_CurrentLoc, then you mentioned that you want to know what to put in Gallery_SelectLoc. Defaults property in Screen 2. What is this control Gallery_SelectLoc? Is it a Form control?

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PytByt
Level 8

Re: How to set Gallery Default Item from Dropdown control

Hi @v-monli-msft 

No, i don't have a form control.

So, 
In Screen1, i have:
DD_SelectLocation (dropdown control, just like figure above)

In Screen2, i have:
Gallery_CurrentLoc (Gallery control, just like the figure above)

I want to make the default selection of my Gallery in Screen2 is the selected item based on my Dropdown in Screen1.

Regards.
pytbyt

Dual Super User
Dual Super User

Re: How to set Gallery Default Item from Dropdown control

Hey @PytByt 

 

Since the items property of both the controls is same. Can you try to use the below expression on the Default property of the gallery control as:

DD_SelectLocation.Selected

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

PytByt
Level 8

Re: How to set Gallery Default Item from Dropdown control

Hi @yashag2255 

It still no luck:
cb9.png

Anw,
I tried to reversed the logic the other way around  by selecting my gallery, it will defaulted my combo box. 

So,
I put the lookup formula in my ComboBox Default property, and nothing happened. Just blank like this:
cb10.png 
Although, as you can see. i have value in my gallery selected result which is OR-1-2-3

Is this blank can be fix? how?

Please Help.

Regards,
pytbyt

Community Support Team
Community Support Team

Re: How to set Gallery Default Item from Dropdown control

Hi @PytByt ,

 

This formula will return a record while combo box expects for a string. So please add ".columnname" at the end of this formula.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Dual Super User
Dual Super User

Re: How to set Gallery Default Item from Dropdown control

Hey @PytByt 

 

Based on the error that you are getting, it is not recognizing the dropdown control. Can you please check if the correct control name is referenced in the "Default" property of the control?

If you want to try out the reversed method, you can update the "DefaultSelectedItems" property of the control as:

[Gallery1.Selected.Result]

or

[LookUp(MasterLocationsColl,wMSLocationID = Gallery_Locations.Selected.Result)]

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

PytByt
Level 8

Re: How to set Gallery Default Item from Dropdown control

Hi @yashag2255 

This is what i get when trying the formula in my Combo Box Default property:

cb14.png

I think we already try everything?

Regards, 
pytbyt

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,009)