Delete the sharepoint list item in trigger

I want to delete a sharepoint list item as it is in trigger - List Item Added.
The activity is List Item Added-For Each List Item-Delete List Items.


Output: Delete List Items: String ‘22’ was not recognized as a valid DateTime.Couldn’t store <22> in Modified Column. Expected type is DateTime.
Actually 22 is the ID Value.
There is no ID in dropdown list.

@rosamonde88

There is no ID in the dropdown because in for each list item activity, you are only retrieving column title and not ID.

@rosamonde88

in columns to retrieve you need to select the column you need

also if the column name is changed it would show the old name and new name is seen only in sharepoint ui..to know old name goto list settings or inspect the page

cheers

@sonaliaggarwal47 @Anil_G
Sorry, picture 2 mislead you, the full info of my picture 2 is:


The problem is solved by a rough way temporary.
The output format of the ID in trigger is string; So flow can not delete the sharepoint item if it uses the same output.
So I build a temporary datatable which I can control the format.

If you have any better solution, pls tell me. Thank you very much.

@rosamonde88

First thing you dont need a for each list item at all

delete list items alone would delete the items based on matched filter

cheers

You’re right. Delete List Items is enough. But perhaps that’s not the point. :laughing:

@rosamonde88

can you please elaborate

if the filter is the issue..then if you want to use ID..you see a blue use filter on the activity click on it and thwn it turns to use ID ..then you can filter by ID

hope this helps

cheers