cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rgriffiths
Level: Powered On

Open gallery without an item selected

I have a gallery on the left of the screen and a form on the right. When a user selects an item from the gallery on the left the selected item is shown on the right. This is working fine.

 

However when I first go to the screen there is always an item already selected from the gallery by default. It will be the last one showing on the developement screen.

 

How can I set the gallery to be unselected when it first opens so that the form starts blank (or not visible) until an item has been selected?


Accepted Solutions
Community Support Team Rank
Community Support Team

Re: Open gallery without an item selected

Hi @rgriffiths

I have made a test on my side, please take a try with the following workaround:3.JPG

 

4.JPG

Set the OnSelect property of the Gallery control to following:

Set(CurrentSelectedItem, ThisItem)

Set the Item proeprty of the Display form control to following:

CurrentSelectedItem

Note: The Display form and the Galery connect to same data source.

 

Best regards,

Kris


All Replies
Microsoft Employee

Re: Open gallery without an item selected

Hello @rgriffiths,

There's no way to have a gallery control in a state where none of the items are selected. You should be able to achieve the desired behavior though by setting the form in the "New Mode" by default and then switching it to "Edit Mode" on selecting an item from the gallery control.

Mike8
Level 10

Re: Open gallery without an item selected

Hello,

You can also try Gallery1.Default = {}

jamiewr
Level: Powered On

Re: Open gallery without an item selected

Hi,

 

I would recommend setting the Gallery's OnSelect to something like Set(selectedItem,ThisItem). 

 

Then initialize selectedItem in your OnStart or the screen's OnVisible property to Blank() (e.g. Set(selectedItem,Blank()))

 

Then set the form's Item value to selectedItem

 

That usually works for me.

 

 

Community Support Team Rank
Community Support Team

Re: Open gallery without an item selected

Hi @rgriffiths

I have made a test on my side, please take a try with the following workaround:3.JPG

 

4.JPG

Set the OnSelect property of the Gallery control to following:

Set(CurrentSelectedItem, ThisItem)

Set the Item proeprty of the Display form control to following:

CurrentSelectedItem

Note: The Display form and the Galery connect to same data source.

 

Best regards,

Kris