Create unique photo label with data from nested repeatables in Survey 123 report template

787
0
02-26-2021 04:52 PM
MaddieShields2
New Contributor

Hi Everyone,

I am trying to create unique photo labels to associate field observations (primary repeatable) with their photos (nested repeatable) in a Survey123 report template. I have three different kinds of observations, each with their own photos. The survey is laid out as follows:

  • Main survey questions
    • Observations (primary repeatable) > Photos (nested repeatable)
    • Known Issues (primary repeatable) > Photos (nested repeatable)
    • New Issues (primary repeatable) > Photos (nested repeatable)
  • Remainder of main survey questions

I’m trying to create an end-of-document photolog that encompasses all the photos taken. To link the actual observation record with the photo, I need some sort of photo identifier (“Photo 1” or “Observation 1, Photo1”).

I tried referencing the photo position, but found that creates repeat numbers between primary repeatables (Observations Repeat entry 1 Photo 1 would have a position of 1, and Observations Repeat entry 2 Photo 1 would also have a position of 1). 

I also tried joining the repeatable position of the primary with the repeatable position of the photo but ended up with this:

Input

Output

${#Observations_Repeat}

O${$feature | getValue: "position"} ${/}: ${#Observations_Repeat} ${#Observations_Photos_Repeat} P${$feature | getValue: "position"} ${/} ${/}

O1 : P1 P2 P3

The goal of the above statement being to achieve something like O1:P1, O1:P2, etc.

Is there a way to create unique photo labels from data in nested repeatables without creating a specific field for it in the survey itself? Is there a way to link the GlobalID//ParentGlobalID? 

Any thoughts/ideas are welcome and greatly appreciated!

0 Kudos
0 Replies