cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
krishnasharma13
Frequent Visitor

Problem in using remove in If function

I'm getting a runtime error while using this "If(Label.Text="Text", Remove(Database, Gallery.Selected))", can we use this or not, if not what is an alternative way for this?

2 ACCEPTED SOLUTIONS

Accepted Solutions
BCBuizer
Super User
Super User

Hi @krishnasharma13 ,

 

Not sure what may be causing the error, but please consider this:

 

RemoveIf(Database, Label.Text = "Text" && ID = Gallery.Selected.ID)


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

NandiniBhagya20
Solution Sage
Solution Sage

If you are using the below formula on select of a button, it should work:
If(Label.Text="Text", Remove(Database, Gallery.Selected))


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

View solution in original post

2 REPLIES 2
BCBuizer
Super User
Super User

Hi @krishnasharma13 ,

 

Not sure what may be causing the error, but please consider this:

 

RemoveIf(Database, Label.Text = "Text" && ID = Gallery.Selected.ID)


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.
NandiniBhagya20
Solution Sage
Solution Sage

If you are using the below formula on select of a button, it should work:
If(Label.Text="Text", Remove(Database, Gallery.Selected))


Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

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.

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 (3,471)