Showing results for 
Search instead for 
Did you mean: 
Super User
Super User

URGENT - remove from collection if dropdown selection is blank



OnChange of a dropdown, I am doing the following... to set the chosen value to a global variable, and also add it to a collection if the selection is not blank (there is a blank Items entry at the start). 



Set(Desk1EL4, Desk4_1.Selected.Value);
Collect(FFELMulti, {deskref: If(!IsBlank(Desk4_1.Selected.Value), Desk4_1.Selected.Value), date: DeskDate1EL4});

//If(IsBlank(Desk1_1.Selected.Value), Remove(FFELMulti, Desk1_1.Selected.Value))



What I want is, if the user selects the blank value, to remove it from the collection. This way, when I patch ForAll items in the collection, it will only patch data over to Dataverse for dropdowns which are not set to blank. 


Please help. I have commented what I have tried, but this is erroring on the Remove part!!!


Many thanks


Resolver II
Resolver II

if I understood correctly, you wanted to remove items that have deskref being blank?

maybe you can try with this formula:

RemoveIf(FFELMulti, IsBlank(deskref))

Helpful resources

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,476)