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 / Distinct and Sort in C...
Power Apps
Unanswered

Distinct and Sort in Combo box

(0) ShareShare
ReportReport
Posted on by 187

Finally got this almost working.

 

Below is a Comb Box that has the following ' DataCollection ' in the Items property, with the following in the ' DefaultSelectedItems ' property.

The return is 36 items, the majority repeats of the same four the formula is asking for. The default should only be the four (or more, based on the content of Label1_8), and the return and the content of the Combo Box list should be sorted Ascending.

 

How do I update the below to achieve the above? 

 

Filter(DataCollection, field_1 in (Label1_8.Text), If(ProcurementProfessional = field_1, Label1_8.Text))

PhineasT_0-1651507872110.png

 

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @PhineasT 

    The Items property of the combobox:

    Sort(
     Distinct(
     DataCollection, ProcurementProfessional
     ),Ascending
     )
     
     

    The DefaultSelectedItems:

    If(Label1_8.Text="ProcurementProfessional",
     First(
     Filter(
     Sort(
     Distinct(
     DataCollection, ProcurementProfessional
     ),Ascending
     ), Result=Label1_8.Text
     )
     )
    )
     

     

  • PhineasT Profile Picture
    187 on at

    That didn't work. I believe what you were trying to achieve I have already achieved with the below. What the below DOES NOT do is auto-populate the Combo Box based on the content of Label1_8.Text.

     

    I can open the Combo Box and see and list of email addresses and pick from those available.

    What I also need is for the email addresses associated with the content (member names) in Label1_8.Text to auto-populate in the Combo Box.  

    What I have now; It only needs updating to auto-populate the emails desired:

     

    Items:

    Sort(
    Distinct(
    DataCollection,
    EmployeeEmail
    ),
    Result)

    DefaultSelectedItems:

    Filter(DataCollection,field_3, field_1 in (Label1_8.Text),field_3,Ascending)

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