I have a logic App which starts with a Salesforce Trigger where it checks for Account updates. I want only records where createdate is >= today-20days.
"queries": {
"$filter": "CreateDate ge '@{formatDateTime(addDays(utcNow(), -20), 'yyyy-MM-dd')}'"
If I enable this filter I do not get any records. If I delete this filter I get records where CreateDate is more than 20 days ago which I want to filter.
After reproducing from my end, I can see that the mentioned filter is working fine.
I used the same query provided by you.
queries": {
"$filter": "CreateDate ge '@{formatDateTime(addDays(utcNow(), -20), 'yyyy-MM-dd')}'"
}
Results:
If I enable this filter I do not get any records.
The above expression retrieves the results of records that are 20 days ago. Since, you aren't receiving any data or error, that indicates there are no records that are in the last 20 days.