Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Blank Value in drop down with filter

(0) ShareShare
ReportReport
Posted on by 178

Hi Guys,

 

Currently I have a code that will add a  " " value into my dropdown items. This allows me to show the user a default blank value prior to making a selection.

 

I have the below code in my items property within my dropdown list.

 

 

Sort(Distinct(
 Filter(
 Split(
 Concatenate(
 Concat(Types,Res &","),
 " " &","
 ),"," 
 ),!IsBlank(Result)
 ),
 Result
 ),Result)

 

 

This works fine if you want to show the whole collection in a dropdown list.

 

I want to apply a filter and still keep the blank value.

 

I dont know how to add in the filter within the above code.  This is the filter I want to apply while still adding in the " " value.

 

Sort(Distinct(Filter(Types,Height= "720"),Res),Result)

 

 

Any help is greatly appreciated.

 

Thanks

  • christian12 Profile Picture
    christian12 178 on at
    Re: Blank Value in drop down with filter

    Thank you so much. This worked 🙂

  • WarrenBelz Profile Picture
    WarrenBelz 145,434 on at
    Re: Blank Value in drop down with filter

    Hi @christian12 ,

    Try

    Ungroup(
     Table(
     {
     dd: 
     Table(
     {Result: ""}
     )
     },
     {
     dd: 
     Sort(
     Distinct(
     Filter(
     Split(
     Concat(
     Types,
     Res & ","
     ) & " ,",
     ","
     ),
     !IsBlank(Result)
     ),
     Result
     ),
     Result
     ).Result
     }
     ),
     "dd"
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • Verified answer
    BCBuizer Profile Picture
    BCBuizer 21,809 on at
    Re: Blank Value in drop down with filter

    Hi @christian12 ,

     

    Nesting the data source (Types) in a filter should do the trick:

    Sort(
    	Distinct(
     Filter(
     Split(
     Concatenate(
     Concat(
    						Filter(
    							Types,
    							Height= "720"
    						),
    						Res &","
    					),
     " " &","
     ),
    					"," 
     ),
    				!IsBlank(Result)
     ),
     Result
     ),
    	Result
    )

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,434

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,722

Leaderboard