cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerAppNewbie
Regular Visitor

Need to return blank records based on dropdown value of ""

Hi, 

I have a form where managers have to provide their approval for certain submissions.  I have an approval status column for each manager in my table (e.g. manager1Decision, manager2Decision, etc up to 8).  The drop-down selection for each of these is:

"" (blank)

Approved

Rejected

Needs Discussion

 

I am adding a filter to allow them to filter based on their approval status.  In my filter, I can return all other values except the "" blank field.  I would like to be able to return those records that they have not provided an approval status for so they can focus on those as needed.  Below is my current formula and I have no idea where to go from here.

 

Filter(DataTable,'manager1Decision' = dropdownmanager1.Selected.Value)

 

Any assistance would be greatly appreciated.  Thanks!

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @PowerAppNewbie ,

From what you are saying, you want all where the Approval status is blank in any of 8 drop-downs? Your code however

Filter(DataTable,'manager1Decision' = dropdownmanager1.Selected.Value)

Refers to decisions - so what exactly to you want the criteria to be?

Hi @WarrenBelz. Thanks for the reply. Blank is one of the selections in the drop-down for the approval status. In my filter drop-down I have Items=[“”,”Approved”,”Rejected”,”Needs Discussion”]. The filter works for every selection except the “” which is the blank. I need to be able to return records that are blank and do not have or I guess in this case equals “” for the drop-down value for blank. Hope that makes sense. Thanks!

Thanks @PowerAppNewbie 

Just making sure

Filter(
   DataTable,
   IsBlank('manager1Decision') ||    
   'manager1Decision' = dropdownmanager1.Selected.Value
)

 

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.

Hi @WarrenBelz, I tried the formula you suggested and you will see what I am using below.  It works fine for all selections except the "" selection in the dropdown filter.  When I select "" in the filter dropdown the gallery is blank with no data at all.  I really appreciate your assistance.

 

Filter(Datatable,
IsBlank('manager1Decision') ||
'manager1Decision' = manager1Decisiondropdown.Selected.Value)

Hi @PowerAppNewbie ,

Try 

Filter(
   Datatable,
   IsBlank('manager1Decision') ||
   'manager1Decision' = "" ||
   'manager1Decision' = manager1Decisiondropdown.Selected.Value
)

 

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.

Hi @WarrenBelz , 

 

Unfortunately the formula did not work.  What I ended up having to do was:

  1. Allow a blank space to be part of my look up table in Excel (Data Validation) for the manager decision and let the blank space be the default selection.  
  2. In Power Apps, I used my lookup table in Excel as the source of the dropdown filter instead of hard coding the look up value in Power Apps.
  3. Then I went back and added the formula below:
Filter(
   Datatable,
   'manager1Decision' = manager1Decisiondropdown.Selected.Values
)

 

That seemed to do the trick.  I am guessing because the "" was now considered a valid selection, then when I selected "" or any of the other choices, it worked fine.  

 

I really appreciate your assistance in trying to help me figure it out.  Thanks!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,297)