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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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 (4,791)