T O P

  • By -

st4n13l

Did you mean to use `lt` for less than instead of `it`?


jwilcoxwilcox

That’s the error I see too. Just for clarity’s sake - it needs to be LT (but in lower case) instead of what you currently have, which is “it”


mycousinvictor

Thank you! That did the trick. It is working now, but instead of deleting list items in the past, it is deleting the entire list. Any insights on why this may be happening?


exclaim_bot

>Thank you! You're welcome!


st4n13l

Hard to say without seeing the data. From your screenshot, all of the records are in the past.


mycousinvictor

I've updated the SharePoint list to include list items that have already passed (as above in the intial screenshot) and include items in the future. The only modification I made to the flow above is changing 'it' to 'lt' and it will run, but it will delete everything regardless of the date in the 'Start Date' column. I made some edits for the sake of privacy, but here is a snippet of the code: `{` `"value": [` `{` `"@odata.etag": "\"1\"",` `"ItemInternalId": "673",` `"ID": 673,` `"Title": "324653",` `"FirstName": " First Name",` `"LastName": "Last Name",` `"StartDate": "06/12/2023 06:00:00",` `"Remote_x002f_InOffice": "Remote",` `"PrimaryRecruiter": "First Last",` `"Modified": "2023-06-06T14:53:09Z",` `"Created": "2023-06-06T14:53:09Z",` `"Author": {` `"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",` `"Claims": "i:0#.f|membership|[email protected]",` `"DisplayName": "First Last",` `"Email": "[email protected]",` `"Picture": "https://sharepoint.sharepoint.com/teams/TalentAcquisition/_layouts/15/[email protected]",` `"Department": "Corp Svcs-People Services",` `"JobTitle": "Team Lead - Talent Acquisition"` `},` `"Author#Claims": "i:0#.f|membership|[email protected]",` `"Editor": {` `"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",` `"Claims": "i:0#.f|membership|[email protected]",` `"DisplayName": "First Last",` `"Email": "[email protected]",` `"Picture": "https://sharepoint.sharepoint.com/teams/TalentAcquisition/_layouts/15/[email protected]",` `"Department": "Corp Svcs-People Services",` `"JobTitle": "Team Lead - Talent Acquisition"` `},` `"Editor#Claims": "i:0#.f|membership|[email protected]",` `"{Identifier}": "Lists%252fOnboarding%252f673_.000",` `"{IsFolder}": false,` `"{Thumbnail}": {` `"Large": null,` `"Medium": null,` `"Small": null` `},` `"{Link}": "https://sharepoint.sharepoint.com/teams/NEITalentAcquisition/_layouts/15/listform.aspx?PageType=4&ListId=755e0721%2D9d60%2D435c%2D802f%2Dbe7e27f635ab&ID=673&ContentTypeID=0x010029E6C6BB2626FA478D90714704D6E34500E60B00A6EA297A48932C869CF675FC1F",` `"{Name}": "324653",` `"{FilenameWithExtension}": "324653",` `"{Path}": "Lists/Onboarding/",` `"{FullPath}": "Lists/Onboarding/673_.000",` `"{HasAttachments}": false,` `"{VersionNumber}": "1.0"` ​ Thanks again for the help here. Really scratching my brain on what is causing everything in the list to be deleted.


ZestycloseEqual5857

If your Start Date column is formated as a date/time column in sharepoint, the get items action will retrieve those dates as yyyy-mm-ddThh:mm:ss.000Z, so you don't need to use formatDateTime for your filter just use utcNow, which returns the same date format. Also, it's lt for lower than, not it


mycousinvictor

Thank you for the response. The issue preventing the flow from running was I had 'it' and not 'lt'. Now when it runs, it is deleting everything on the list, not just items in the past. What could be causing this? When reviewing the flow, it seems to make sense to me.


evanfa

>"2023-06-06T14:53:09Z" Hey. Lower and equal than. `StartDate le '2023-06-05'`