Select to view content in your preferred language

Calculation to get latest values in repeat is not working

319
4
Jump to solution
08-13-2025 07:02 AM
dsinha
by
Frequent Contributor

Hello,

I am trying to populate a field with the latest observation in a repeat field. I tried to follow the instructions provided here, but I am receiving an error message (see below).

Here is my XLSForm

dsinha_0-1755093522278.png

And here is the error message

dsinha_1-1755093572124.png

dsinha_2-1755093616697.png

dsinha_3-1755093659121.png

Any help would be appreciated. Thanks!

 

 

 

0 Kudos
2 Solutions

Accepted Solutions
CodyPatterson
MVP Regular Contributor

Hey @dsinha 

Just a longshot, but your index-repeat, should it be indexed-repeat?

Cody

View solution in original post

ZenMasterZeke
Frequent Contributor

Try putting ${resolution_status} where you have ${resolution_status_label} 

View solution in original post

4 Replies
CodyPatterson
MVP Regular Contributor

Hey @dsinha 

Just a longshot, but your index-repeat, should it be indexed-repeat?

Cody

ZenMasterZeke
Frequent Contributor

Try putting ${resolution_status} where you have ${resolution_status_label} 

dsinha
by
Frequent Contributor

Thanks @CodyPatterson, you are right. It is Indexed instead of Index.

Thanks @ZenMasterZeke, I changed it to ${resolution_status}.

Despite both changes, it still gives me the an error message.

dsinha_0-1755096336347.png

 

0 Kudos
dsinha
by
Frequent Contributor

Got it figured out. Was missing a $ sign in that count function.

Posting the final XLSForm that is working as expected

dsinha_0-1755098317548.png