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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Default Item to top of...
Power Apps
Unanswered

Default Item to top of Combo Box List

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2

I'm using the below. It works.

 

How do I edit the formula to force the employee's home park code to default to the top of the Comb Box list when ever the screen when the screen opens?

 

The formula below says - If your hierarchy is 'Region' show ONLY parks in the region in which your park is located in ascending order; if you are any other hierarchy show all parks in ascending order.

 

I need the formula updated to force the employee home park to the top of the Combo Box list by default when the employee transitions to this screen.

 

I had been doing the above with the following formula; which shows all parks in ascending order, defaulting to the user's home park.

 

     Sort(Filter(ParkListCollection, Park=varParkAlpha), Park, Ascending)

Categories:
I have the same question (0)
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    You could set it as the Default by using the DefaultSelectedItemsProperty.

     

    If this is a standard Power App (Not Power Apps for Teams) set the DefaultSelectedItems property like this.

    [ UserHomePark ]

     

    I don't know where you have that information.  So you will have to replace 'UserHomePark' with the correct information.

     

    If it's in a variable it would be like this:  [Variable].    The key is that it has to be a record value, which is accomplished like this:  [ ]

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    I already have the following formula in the Combo Box DSIP that does everything I need it to do - except default to user home park. How would I incorporate what you suggest into it?

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Did you miss including the formula?    Is your ComboBox in the gallery?

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    I tried what you suggest in front and behind the formula I have in the DSIP of the Combo Box. All I get is errors. The working formula that I need updated is as follows. Can you show my how you would edit the formula to achieve my intended goal of user's home park defaults to top of Combo Box list?

     

    If(varPrograhHierarchy="Region",
            Filter(ParkListCollection, NPSRegion=Label.Text)),ParkListCollection,Park)

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I can show you how to edit that formula but I will need to know where the user's home park information is coming from.   

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    I capture it in a variable - varIsParkAlpha

     

    and

     

    I have it visually displayed in Text1.Text to ensure the variable is working; it is; the user's home park appears as a result of this variable in in this text field. 

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Try this.  You may have to adjust it slightly:

     

    If(varPrograhHierarchy="Region",
     
     Filter( 
     Filter(ParkListCollection, NPSRegion=Label.Text)
     ),
     ParkListCollection,Park || varIsParkAlpha
    
     )
     )

     

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I am curious why the formula you provided is in the Default Selected Items property and not the Items property.    That should be your Items property and then your default selected Items property would be:

     

    [varIsParkAlpha]

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Ok.

     

    Almost got it. 

     

    This version defaults to home park, but does not provide the rest of the list until you delete the default content first.

     

    Is there a way to 'see' the default park first and the rest of the list descending when the box is opened?

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

     It actually show both.  The default selected item and the list of items as well.   What is your Items property for the combobox?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard