Hi everyone,
I'm looking at building an automated workflow to check if a survey has been submitted in the last week, and if not, to send a notification to a manager.
I have most of the flow working, which looks like this so far:
The idea is to just get the layer's data, and compare the last survey's date with today's date to see if more than 5 days have passed since the last survey submission.
My problem is that the "Get data from feature layer" action outputs a JSON that has all the feature layer's records in it, and I can't seem to figure out how to only get it to output the last submitted record.
I tried using the WHERE clause in the action, but it seems that the MAX function doesn't work here (or I wrote it wrong).
Does anyone have an idea on how to filter the records to only get the most recent record/the record with the highest date ?
It would help me a lot,
Thanks all,
Rémy
where=1=1
outFields=*
orderByFields=your_date_field DESC
resultRecordCount=1
This gives one feature sorted by date field.