cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TJO
Resolver II
Resolver II

Deleting Sharepoint list record issue

Hi folks

Due to the delegation limit I'm working on migrating my data source from Excel in OneDrive to a SharePoint list (please stop me here if you think that that is a bad idea).

The patch formula seems to work almost identical to the Excel patch. However, the first problem I've just ran into is that I get an error when trying to delete a record from that list. See the formulae are identical, Excel first and then sharepoint list:

 

 

Remove(
    tabDaten,
    galleryEinträge.Selected
);
Remove(
    AuditListe,
    galleryEinträge.Selected
);

 

 

But in the case of the Sharepoint list I get an error about a column that's holding numbers, but it says that I'm delivering text. I'm not delivering anything here...just want to delete the record. Worth mentioning is that the gallery uses the Excel table as a source, but also there the column in question is of number type.

Any ideas?

13 REPLIES 13
RandyHayes
Super User
Super User

@TJO 

Yes...keep going!  Migrate from Excel to SharePoint for sure!

 

You might want to consider going with the RemoveIf function.  Like this:

RemoveIf(
    tabDaten, 
    ID=galleryEinträge.Selected.ID
);
Remove(
    AuditListe,
    ID=galleryEinträge.Selected.ID
);

Those will be much more precise. 

 

I hope this if helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes Ok thank you...then I'll go on there.

 

However, I'm confused. I don't have a column named ID

@TJO 

If you are in SharePoint now...then you do have an ID column.  Every SharePoint record has one.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@TJO 

Sorry, just realized you had put both the Excel and SharePoint functions in the same preview.

Yes, you would not have an ID column for the first function, but the second would apply (and I noticed I typo'ed in it) - so here it is properly:

RemoveIf(
    AuditListe,
    ID=galleryEinträge.Selected.ID
);
_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@TJO 

Yes, sorry - read my last follow-up reply.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes I guess it's due to the fact that the source doesn't have an ID column...and therefore the statement is not valid:

galleryEinträge.Selected.ID

 

@TJO 

I am missing something...you mentioned that you have moved over to SharePoint.

Your galleryEinträge should be based on that SharePoint list.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@RandyHayes Yes, but I'm not there yet...just started to patch the SharePoint list and now stuck on the deleting records part. But the source of the gallery I'm referring to is still from Excel in OneDrive (i.e. tabDaten) 

@TJO 

Then I'm a little confused still...if you are migrating data over, then what is it you are trying to delete?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,967)