Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Distinct Dropdown Results

Posted on by 4,325
I have Dropodown_1 (Job Type) and Dropdown_2 (Location).

Dropdown_1 has in its items - ["Drop","Install","Storm Work","Trip"]
 
A Location may appear multiple times in the data source (SP List).
I only want each Location to appear in Dropdown_2 once (Distinct).

How do I update the below formula so that the dropdown only shows
each Location once?

Dropdown_2 has in its items -
If(
   JPU_Job_Type_Dropdown.Selected.Value =  "Drop",
   Filter(colPendingDropData,colPending_Invoice_Type = "Drop",colPending_Location),
 
   JPU_Job_Type_Dropdown.Selected.Value =  "Install",
   Filter(colPendingInstallData,colPending_Invoice_Type = "Install",colPending_Location),
   
   JPU_Job_Type_Dropdown.Selected.Value =  "Storm Work",
   Filter(colPendingStormWorkData,colPending_Invoice_Type = "Storm Work",colPending_Location),
   
   JPU_Job_Type_Dropdown.Selected.Value =  "Trip",
   Filter(colPendingTripProjectData,colPending_Invoice_Type = "Trip",colPending_Location))
  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 143,487 on at
    Distinct Dropdown Results
     
    I would have thought it would it would be something like this
    Sort(
       Distinct(
          Filter(
             colPendingDropData,
             colPending_Invoice_Type = JPU_Job_Type_Dropdown.Selected.Value
          ),
          colPending_Location
       ),
       Value
    )
     
  • Suggested answer
    Phineas Profile Picture
    Phineas 4,325 on at
    Distinct Dropdown Results
    I figured it out.
     
       If(
       JPU_Job_Type_Dropdown.Selected.Value =  "Drop",
       Sort(Distinct(Filter(colPendingDropData,colPending_Invoice_Type = "Drop"),colPending_Location),SortOrder.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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard