Create report for the last repeat only - help with syntax

338
3
Jump to solution
03-01-2022 08:28 AM
PanGIS
by
Occasional Contributor III

Hello! 

 

I need to create a report the prints only the last repeat submitted.

I am implementing the flow in Integromat but what I get as attachment is all the inspections contained in the repeat:

 

I suppose it should be something like the following but, of course, it is wrong.

 

${#Repeat | stats:max,surveyDate} 

${/}

 

Thanks! 🙂

0 Kudos
1 Solution

Accepted Solutions
DerrickWestoby
Occasional Contributor III

 

I believe this will do it for you (or get you close)

${#repeat_name | orderByFields:"ObjectID DESC" | resultRecordCount:1}  ${field_in_repeat} ${/}

This will print out the records in "repeat_name" in descending order by ObjectID, with a maximum of 1 record returned. 

 

 

View solution in original post

3 Replies
DerrickWestoby
Occasional Contributor III

 

I believe this will do it for you (or get you close)

${#repeat_name | orderByFields:"ObjectID DESC" | resultRecordCount:1}  ${field_in_repeat} ${/}

This will print out the records in "repeat_name" in descending order by ObjectID, with a maximum of 1 record returned. 

 

 

PanGIS
by
Occasional Contributor III

Fantastic Derrick, it worked!

With you example you also pointed me out to the right documentation.

 

Thank you!

DerrickWestoby
Occasional Contributor III

You're welcome! 

Get in the habit of searching for @IsmaelChivite 's Survey123 blog posts as well.  Assuming he's made one for the thing you're trying to accomplish, I find them a lot more helpful than some of the help docs.  

Good luck! 

0 Kudos