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

Setting Variable to a Gallery Item Not Working

Hi,

In order to deep link to a gallery item in a CDS database, I have the gallery OnSelect property as Set(varItemNav, Gallery1.Selected)

This is supposed to assign the entire record of the gallery as a variable. I then set the form Items property to varItemNav.

So when you select an item in the gallery, it sets that record as a variable and then the form reads the variable. In theory, this should function the same as setting the Items property of the form to Gallery1.Selected

However, when I click on the gallery item, it only records the primary field in the variable. The data source remains unchanged, but when the form reads the variable to know what to display, it thinks the form is blank except for the primary field.

 

I've used this before to deep link parameters to a particular gallery item, but I have no idea why it is suddenly not working on this form. I've removed all other components so I can just try getting the form to display based on a variable and it still doesn't work.

 

Anyone else ever run into something like this?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Setting Variable to a Gallery Item Not Working

Hi @SKH19 ,

 

Please try to recreate the app from Home > Start from data > select your CDS entity as the connector and check if the new app works for you.

 

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.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: Setting Variable to a Gallery Item Not Working

What is the formula used in the Gallery Item property?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
SKH19
Level 8

Re: Setting Variable to a Gallery Item Not Working

@Jeff_Thorpe 

The gallery item property is just the CDS entity.

SKH19
Level 8

Re: Setting Variable to a Gallery Item Not Working

@Jeff_Thorpe 

If I make a whole new screen and just add a gallery and a form by themselves, it still doesn't work. Something appears to be broken deep inside my app.

Community Support Team
Community Support Team

Re: Setting Variable to a Gallery Item Not Working

Hi @SKH19 ,

 

Please try to recreate the app from Home > Start from data > select your CDS entity as the connector and check if the new app works for you.

 

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.

View solution in original post

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,584)