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
Community Support Team
Community Support Team

Re: Open gallery without an item selected

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

4 REPLIES 4
Microsoft Employee

Re: Open gallery without an item selected

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.

Highlighted
Mike8
Level 10

Re: Open gallery without an item selected

Hello,

You can also try Gallery1.Default = {}

Anonymous
Not applicable

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
Community Support Team

Re: Open gallery without an item selected

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

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
Users Online
Currently online: 343 members 5,658 guests
Please welcome our newest community members: