cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
claudia
Helper IV
Helper IV

Remove function -

Hello everybody,

 

 

1. I have gallery which have as a data source a SharePoint library.

2. I have added a Delete button, outside of the gallery

On select from the Delete button, I have used the following formula:  

Remove('Contracts / Agreements to be Approved', galOverview.Selected)

 

Contracts / Agreements to be Approved = data source - SharePoint library

galOverview = Gallery

 

Unfortunately  I receive the following errors:

Incompatible ID column in the data source you're updating expects a 'Number' type and you're using a 'Control' type.

The function "Remove" has some invalid arguments.

 

Please can anybody, help me with this issue?

 

Thank you, for your kind support,

Claudia

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @claudia ,

 

Ok, Please try the below. 

On delete icon selection:  Set(varSelected,Thisitem)

On Popup button selection:   Remove(DataSourceName,varSelected)

This should work in your case. 

 

 Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

19 REPLIES 19
zmansuri
Super User
Super User

It expects an ID

Remove('Contracts / Agreements to be Approved', galOverview.Selected.ID)

PG_WorXz10
Resident Rockstar
Resident Rockstar

Hi @claudia 

 

Please use below formula if it helps your code. 

 

Removeif('Contracts / Agreements to be Approved', ID =galOverview.Selected.ID)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Thank you for your answer.

 

I receive the following error: Incompatible types for comparison. These types cannot be compared: Number, Control

We cant evaluate your formula because the values beign compared in the formula aren't the same type)

Thank you for your answer.

 

I receive the following error: Cannot use a non-record value in this context "galOverview.Selected.ID".

Hi @claudia ,

 

Please try below code. 

Removeif('Contracts / Agreements to be Approved', ID=Value(galOverview.Selected.ID))

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

 

I still receive an error. Please see below.

 

claudia_0-1631009047630.png

 

Hi @claudia ,

 

One more try 

 

Remove('Contracts / Agreements to be Approved',LookUp('Contracts / Agreements to be Approved',ID=galOverview.Selected.ID))

Also could you please confirm the datasource you added in Gallery control is same as the dats source you are trying to remove from ? 

 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

The data source is the same

Hi @claudia ,

 

Did the previous mentioned code work in your case ? 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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