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.
Hi Christopher,
Thanks for your reply, but I can't get this to work on my flow,
Where do you apply this filtering ? I don't find the "orderByFields" or "resultRecordCount" on the workflow action:
Do I need to add in another action to filter through the results of the "Get data from layer" action ? If yes, which action would allow this ?
Thanks a lot,
Rémy
Hi again everyone,
Trying to push this back up as I still don't understand whether this is possible or not,
Thanks,
Rémy