Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Issues when setting 'Default' property of gallery

I have two galleries. DataSource for both is set to 'AssetRisk' which is a CDS entity. First one is used to display list of available records and the second displays details of the selected item from first gallery. I am passing parameter 'ItemId'  via URL and successfully assigning it to a variable in PA (details of deeplinking can be found here😞 

Set(PassedParam, Param("ItemId"))

I can display the desired record in a separate gallery by setting 'Item' property to:

LookUp(AssetRisks, AssetRisk = GUID(PassedParam))

However, what I want to do is to set 'Default' property of a First gallery to display record with 'ItemId' and so that the Second gallery would show the details of that record. I tried setting 'Default' property of First gallery to:

LookUp(AssetRisks, AssetRisk = GUID(PassedParam))

but it didn't have desired effect. Furthermore, even if I use First(AssetRisk) or Last(AssetRisk) in 'Default' propertry of the First gallery it doesn't select nor first neither last record. It is only when I leave 'Default' as blank , then the top record from the list is being selected in First gallery and Second gallery displays details of a record.


Any ideas?

Community Support
Community Support

Hi @GuestOnaQuest ,

Could you tell me the Second gallery's settings?

I've made a similar test but not met the same problem like your description.

Here's my test:

1)set  gallery1's Default: LookUp(list2,Title=2)

        gallery2's Items: Gallery1.Selected

Then, gallery2 display this item by default.944.PNG


2)set  gallery1's Default: First(list2)

        gallery2's Items: Gallery1.Selected

Then, gallery2 display first item by default.945.PNG



Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Long story short, I am using GUID function in default property of the gallery that has a datasource as CDS entity ('AssetRisks'), to be exact: LookUp(AssetRisks, AssetRisk = GUID(PassedParam)) and it does not work.

If I would use the same line of code on 'item' property of view or edit form that has Datasource as the same entity from CDS then the item is displayed.


What I did is set property of 'TemplateFill' of a gallery to: If(ThisItem.AssetRisk = Gallery2.Selected.AssetRisk,RGBA(100, 100, 100, 100),RGBA(0, 0, 0, 0)); So when I would select the item from the gallery the color would change. Thus, we are taking second gallery out of conversation. Then I would set the 'default' property to the code that I discussed in first paragraph. Even in this case the default property doesn't work as corresponding item is not selected.


Please, try to do the test with CDS entity as datasource and use GUID function as an argument in 'default' property. Those 2 conditions are neccessary in order to satisfy the need of the project.


Helpful resources

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (13,161)