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

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users


We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (31,664)