Delete list item in sharepoint list when the condition is right

Hi ,

I am struggling to use the delete list item activity in UiPath,
I do have already a for each for the condition needed.
And when the deletion started it will delete all items on my sharepoint list.

I have get list item
And then For each if current date = 1 of current month
Then delete the items that has a date from previous month
But on my delete list activity I am encountering an error “an unspecified error”

My filter is like this
ID equals ConvertTo.Int32(row(“ID”))

Hi,
Can you provide some more details? Like screenshots or even the UiPath project.

Some points you can check related to this error (“unspecified error”), it usually happens when:

row(“ID”) is Null or string instead of integer.
You’re passing the whole row instead of just the ID.
Or Filter Query is set while using Item Id.

Try to remove filter query and pass only CInt(row(“ID”)) in Item Id property.

HI


I do have a DataRow , and base on the logs the bot is getting the ID: 14

the 2nd image is the Filter from the Delete Item List activity.

Oh I think there is some problem with the parse, you are using like:
Convert.ToInt32(row(0)).ToString

Change to:
Convert.ToInt32(row(0).ToString)

1 Like

@Elle

few considerations

if you want to filter by ID column then first click By ID and use the id filter there…else it would not filter as expected

if you want any other column makes ure thr column display name is what you need to use

cheers