cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
grinds93
Frequent Visitor

IsBlank Function Difficulties

Hello,

 

I have a two combo boxes where Combo1 is at a Regional level and Combo2 is at a territory level. The data is in a sharepoint table

 

Combo2 is dependent on Combo1 as when a Region is selected, the subsequent territories will be available for selection in Combo2.

 

I would like to know which formula would be best in Combo2 to allow all territories to be displayed when Combo1 is blank.

 

Combo1 is using a distinct function. One issue currently is that according to the 'IsBlank' function, the combo1 is not blank ("") even when a selection in Combo1 has not been made. Combo1 has no default selected items.

 

For Combo2 I am planning to use Filter and Isblank functions, that is why the Combo1 being blank is significant. 

 

Please let me know if there is something that is causing Combo1 to have unseen values, and if the Filter/Isblank functions are best for Combo2

 

Appreciate the help

 

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @grinds93 ,

Below is a structure I use that works with either blank or empty string

Filter(
   SPListName,
   Len(ComboBox1.Selected.Result) = 0 ||
   Region = ComboBox1.Selected.Result
).Territory

 

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.

Visit my blog Practical Power Apps

View solution in original post

2 REPLIES 2
Ben_Hoople
Advocate I
Advocate I

Not a lot of detail to work off here,

 

but assuming the table with the territory has a foreign key equal to a region,

you should be able to set the items property to a filter function ie:

 

Filter(TerritoryDataSource, ComboBox1.selectedItems.RegionalCode in <territoryTable>RegionalCode).TerritoryCode 

 

on the other hand, you can set the visible property of the territory box to equal something like:

 

ComboBox1.Selected.Value <> ""

 

but i think you still need to filter you items based on properties.

 

to learn more about the isblank or isempty functions read the solution here:

https://powerusers.microsoft.com/t5/Building-Power-Apps/IsBlank-IsEmpty-or-quot-quot/td-p/180395

its very insightful and well written. 

 

(ps, my hands hurt so i couldn't format all my writing properly, sorry)

 

Hope this helps

WarrenBelz
Super User
Super User

Hi @grinds93 ,

Below is a structure I use that works with either blank or empty string

Filter(
   SPListName,
   Len(ComboBox1.Selected.Result) = 0 ||
   Region = ComboBox1.Selected.Result
).Territory

 

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.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,661)