cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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?

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @Anonymous,

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

Community Support Team _ Kris Dai
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

7 REPLIES 7
dinusc
Microsoft
Microsoft

Hello @Anonymous,

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
Memorable Member
Memorable Member

Hello,

You can also try Gallery1.Default = {}

Anonymous
Not applicable

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.

 

 

v-xida-msft
Community Support
Community Support

Hi @Anonymous,

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

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

This worked! Thank you!

ms-mac_0-1617759806261.png

 

This is the correct answer. The accepted solution is not right.

paulolucas
Frequent Visitor

perfect

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,527)