cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jdhough55
Helper II
Helper II

Removing a row in a collection when a text field is NOT empty

Hi there, 

I  need to execute this command when a textfield is NOT empty : 

 

Remove(RequiredFields, First(Filter(RequiredFields, Id = 1)));

and re-populate it is empty (if the user deleted the content in the textfield for example). 

 

Each textfield is sitting in a datacard. 

 

I can automatically populate a label for example with : 

 

If(IsBlank(DataCardValue14.Text), "false", "true")

 

but i cannot at the moment work out to do a remove command if its empty 

 

I guess i could use RemoveIF but in which property would i add that if the textfield is blank. 

 

Any help would be great. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @jdhough55 ,

 

As you mentioned there are data cards in your App, I assume you are using an Edit form. So you can append the RemoveIf function OnSuccess property of that form.

 

Best regards,

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
SebS
Impactful Individual
Impactful Individual

Hi @jdhough55 

 

Here is the syntax 

 

RemoveIfDataSourceCondition [, ... ] )

 

here is documentation 

 

Remove and RemoveIf functions in Power Apps - Power Platform | Microsoft Docs

 

You could do :

 

Removeif(
         RequiredFields,
         IsBlank(DataCardValue12.Text)
)

 

Regards


If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.
v-jefferni
Community Support
Community Support

Hi @jdhough55 ,

 

As you mentioned there are data cards in your App, I assume you are using an Edit form. So you can append the RemoveIf function OnSuccess property of that form.

 

Best regards,

 

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

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