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
Super User
Super User

@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
Super User
Super User

@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

 

 

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,276)