cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MJ84
Helper I
Helper I

Patch based on a blank value in a combobox

I have a combobox where I want it to patch the selection into a SP list if there is a selection made. If a selection is removed (clicking the X on the selected result I want it to patch back to the SP "Available"...

 

I  have the following line of code on the onchange property of the combobox. The problem is it only patches "Available" never the selection... I think from watching it, it runs through the code Patches the selection from the combobox then it carries on and then just patches back to "available"

 

Patch('SPList',ThisItem,{Spare1:If(IsBlank(ComboBox2_1.Selected.Result),"Available",ComboBox2_1.Selected.Result)})

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
poweractivate
Community Champion
Community Champion

@MJ84 

 

Don't use IsBlank here use IsEmpty. Like this Example:

 

 

If(!IsEmpty(ComboBox1.SelectedItems),Collect(MyColl02,"Some" & Text(RandBetween(10,100))),Collect(MyColl02,"Zome" & Text(RandBetween(1,100))))

 

 

Here notice it works see this example where it works and knows when there's nothing or something in Combobox and reacts differently with above formula:

102121-somezome.gif

 

 

 

 

View solution in original post

1 REPLY 1
poweractivate
Community Champion
Community Champion

@MJ84 

 

Don't use IsBlank here use IsEmpty. Like this Example:

 

 

If(!IsEmpty(ComboBox1.SelectedItems),Collect(MyColl02,"Some" & Text(RandBetween(10,100))),Collect(MyColl02,"Zome" & Text(RandBetween(1,100))))

 

 

Here notice it works see this example where it works and knows when there's nothing or something in Combobox and reacts differently with above formula:

102121-somezome.gif

 

 

 

 

View solution in original post

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,634)