cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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?

1 ACCEPTED SOLUTION

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

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.
4 REPLIES 4
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 = {}

Highlighted
jamiewr
Level 8

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 @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

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.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 201 members 3,819 guests
Please welcome our newest community members: