web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Select the first item ...
Power Apps
Unanswered

Select the first item in the gallery by default

(0) ShareShare
ReportReport
Posted on by 12

I am building a inspection checklist for a factory. The inspection starts at one side of the building and ends on the other side, on this route there are 'inspectionpoints' with different things to inspect ('ToCheck'). Every 'InspectionPoint' has an 'InspectionPointNumber' and a 'InspectionPointSubject'. Also, with every check it is optional to add a commend or a picture.

 

 

 

My Question:

I inserted a textlabel above the gallery, which has to show the right 'InspectionPointSubject'. It works, but when the inspection point number changes, the textlabel is empty until a item in the list is selected. I tried different things but i can't figure it out. It would be great if the gallery selected it's first item by default, also after the items change.

 

Inspectionapp textlabel powerapps.png

Inspectionapp Sharepoint list.png

  

 

 

 

 

The coloms of the sharepointlist are:

InspectionPointNumber: logical unique number per inspectionpoint

InspectionPointSubject: discription of the inspectionpoint
CheckNumber: Logical number for each item to check for each inspection point. 
ToCheck: Things to check, at least one and max. 12 for each inspectionpoint
Picture: Optional to add a picture for each item to check

Comments: Optional to add a comment for each item to check

Checked: True or false, everything 'ToCheck' has to be checked before the next Inspectionpoint can be started. reat if the gallery selected it's first item by default, also after the items change.

 

 

 

Categories:
I have the same question (0)
  • moritz0815 Profile Picture
    201 on at

    Hello,

    How do you change the inspection point number ?

  • the_dude Profile Picture
    361 Super User 2024 Season 1 on at

    Hi Ramon,

     

    I'm not exactly understanding the problem / exactly how the app is operated.

    However, would it help you if you put a 2nd label on the exact same place which 'visible' property you manage with  IsBlank(theOriginalLabel.Text)  ?

     

    This way, the 2nd label will only be visible when the 1st label is not showing any text. 

     

    Kind Regards

  • Ramonzwiers Profile Picture
    12 on at

    With the button 'next inspectionpoint', which has the formula as on the picture below. But to answer your question, the formula on the onselect property: Set(varCount,varCount+1).

    The formula of the gallery is: 

     

    Sort(Filter('Checklist inspection monthly',InspectionPointNumber = Text(varCount, "00#")), CheckNumber, SortOrder.Ascending)

     

    inspectionapp button next inspectionpoint formula.png

  • Ramonzwiers Profile Picture
    12 on at

    Hello,

    I think my answer on moritz0815 will help to understand. The textlabel will show text when you select an item by hand. But i would like it to automatically select the first item in the gallery. 

     

    Here the textbox is empty

    voorbeeld 1.png

    Here, after the first item is selected, it shows the right inspection point subject

    voorbeeld 2.png

     

     

  • moritz0815 Profile Picture
    201 on at

    Set your Default property to : First(Self.AllItems)

  • Ramonzwiers Profile Picture
    12 on at

    Yes that works, but starts another problem. 

    Everytime another item is selected, the gallery goes back to the first item. This happens when a when a checkbox is checked, picture or comment is added too.

  • moritz0815 Profile Picture
    201 on at

    Maybe the following idea works: You set a variable when navigating the page as I wrote above. When selecting the gallery element, you set this variable to the one you just selected. The default property is then set to the defined variable.

  • Ramonzwiers Profile Picture
    12 on at

    I am not that experienced with power apps yet, i am sorry. Can you make an example of a right formula?

  • moritz0815 Profile Picture
    201 on at

    On the page, where your gallery sits you set the OnVisible: 

    Set(varSelctedItem,First(Gallery1.AllItems))

     

    In your Gallery (Gallery1 in my case) you set the Default:

    varSelectedItem

     

    and the Select:

    set(varSelectedItem,ThisItem)
  • Ramonzwiers Profile Picture
    12 on at

    Unfortunately, is not working. Not one item is selected when i try the app. Below i put the three formula's,

     

    example 2.png

     

    example 3.png

     

     

    example 1.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 70

#2
WarrenBelz Profile Picture

WarrenBelz 64 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 36 Super User 2026 Season 1

Last 30 days Overall leaderboard