Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Distinct function for combo box is populating blanks

(0) ShareShare
ReportReport
Posted on by 559

Hi All,

I have a combo box(dd ) and using filter and distinct to get unique values. And my code is 

If(
SeniorSearchCombo.Selected.Result in varseniordd.sddname,
Distinct(
Filter(
vardd,
sddname = SeniorSearchCombo.Selected.Result
),
ddname
).Result ,
Sort(
Filter(
Distinct(
vardd,
ddname
),
Not(IsBlank(Result))
),
Result
)
)

The first condition works based on the another combo box (senior dd). When the SeniorDD is selected the respective DD under them would be populated in this Combo box (dd). The second condition would filter all the dd names by default in the SP list.

But my combo box is having blank values even though I have used Distinct function.

Any help would be greatly appreciated.

Categories:
  • Sri Profile Picture
    559 on at
    Re: Distinct function for combo box is populating blanks

    Hi @RandyHayes ,

    I have a continuation to this requirement. First condition is working fine. If Seniordd is selected in another combo box, the respective DD names under the Senior DD loads fine. But the other condition when none of the Senior DD is selected by default it must display all the DD names which are in the SharePoint list.

    But in my case, It works only when Senior DD is selected the DD names are displayed whereby default it is listing only few names (For e.g. If I have 12 names as DD in SharePoint only 5 is getting listed.)

     

    Any help/suggestion on this?

    Thanks in advance.

  • Sri Profile Picture
    559 on at
    Re: Distinct function for combo box is populating blanks

    Hi @RandyHayes ,

    Thank you so much. It worked perfectly.

  • Verified answer
    RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Distinct function for combo box is populating blanks

    @Uthhra 

    You're not checking for blank in both scenarios.

     

    Please consider changing your Formula to the following:

    Sort(
     Filter(
     Distinct(
     Filter(vardd,
     !(SeniorSearchCombo.Selected.Result in varseniordd.sddname) || sddname = SeniorSearchCombo.Selected.Result
     ),
     ddname
     ),
     !IsBlank(Result)
     ),
     Result
    ) 

     

    I hope this is helpful for you.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard