cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
OsmandFernando
Post Prodigy
Post Prodigy

I want the gallery not to have a selected item when App is starting

Hi Experts, 

 

I am moving towards the end by learning a lot from you. Thank you again, Thank you MS for taking this community initiative. As you can see from below image there is an item always selected when I open the app. But I want not to have a selected item when the app is loading. Is it possible?

 

Osmand

 

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @OsmandFernando ,

The reason why you met this problem is that the gallery.selected is set to the first item by default. So even you haven't selected item, the gallery.selected means the first item.

You could set the gallery's Default property to change the gallery's default selected item.

When this property is blank, then the gallery's default selected item is the first item.

Please set the gallery's Default to :   {}

Then the the gallery's default selected item will be blank.

12182.PNG

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
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
SeanHenderson
Impactful Individual
Impactful Individual

Hi @OsmandFernando 

You are going to want the gallery and form to use a variable, which won't be set upon App Start, therefore nothing will be selected.

 

So set the gallery's OnSelect property to something like:

Set(varGallery, Gallery.Selected)

and the Items property on your Form to:

varGallery

 

Let me know if that works.

---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

@SeanHenderson  thank you for your reply. But I do not have a form the buttons under each item in the gallery are groups (set of buttons). At the moment I have the following type of formula for each group, 

 

If(Gallery7.Selected.Value="Master Data",true,false)

 

Osmand

Hi @OsmandFernando ,

The reason why you met this problem is that the gallery.selected is set to the first item by default. So even you haven't selected item, the gallery.selected means the first item.

You could set the gallery's Default property to change the gallery's default selected item.

When this property is blank, then the gallery's default selected item is the first item.

Please set the gallery's Default to :   {}

Then the the gallery's default selected item will be blank.

12182.PNG

 

 

 

Best regards,

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

@v-yutliu-msft very simple and effective. Thank you so much, also thank you @SeanHenderson 

 

I am done with m 1st ever app....yeyyyyyyy. 

 

Osmand

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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,133)