show most recent child record date in parent layer using survey123 connect

712
1
Jump to solution
05-27-2023 02:57 AM
tendtreesTC
New Contributor III

I'm trying to show the date of the most recent audit (which is recorded in a repeat field) and also the result of that audit in the parent feature layer.

Is there a calculation I can use in survey123 connect to find the most recent child record and then draw attributes from that into the parent record? 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
tendtreesTC
New Contributor III

For anyone who may come across this post I found a solution.

I use the indexed-repeat calculation to return the value from a repeat.  In order to find the most recent repeat I use the count calc.

The complete calculation looks like this:

indexed-repeat(${audit_date}, ${inspection_audit},count(${audit_date}))

View solution in original post

1 Reply
tendtreesTC
New Contributor III

For anyone who may come across this post I found a solution.

I use the indexed-repeat calculation to return the value from a repeat.  In order to find the most recent repeat I use the count calc.

The complete calculation looks like this:

indexed-repeat(${audit_date}, ${inspection_audit},count(${audit_date}))