Include variable from outside repeat in column of repeats table

132
4
07-30-2020 05:59 AM
Environnement_1Lausanne
Occasional Contributor

Hi all,

I am currently trying to create a feature report template that contains a table with all the entries from a repeat describing geological layers (repeat name blue and questions within repeat green). I would now like to add a variable (${water_level}) from outside of the repeats (recorded after the repeats in my app) in the middle of the table displaying the repeat entries.

Largeur de couche

Profondeur

Niveau d'eau

Nature du terrain

Coupe technique

${#new_layer}${layer_width}

${layer_bottom}

${water_level}

${description}

${tech_layer}${/}

Whenever i try to upload the feature report template i get the following error message:

Failed to parse ${water_level}. Field ${water_level} does not exist or cannot be found in current parsing scope.

However if i print the variable somewhere outside the table everything's fine.

I tried creating a calculate field within the repeat based on the ${water_level} variable outside of the repeat, but as the ${water_level} is only specified after recording several layers in the repeat, the water level value gets only assigned to the calculate field of the last repeat entry.

 

Does someone have an idea how i could solve this?

Cheers,

Flo

feature report‌

repeat template‌

survey 123 repeat‌

Reply
0 Kudos
4 Replies
Ruth_JiatengXu
Esri Contributor

Hi Flo,

Thank you for sharing your question here, and sorry for the late reply.

Since water_level is not a question within your new_layer, could you try to replace the ${water_level} with ${CorrectLayerName.water_level}? So, the service can find the field of water_level in the correct layer.

If this does not for you, would it be possible to share a simplified version of your XLSForm and report template?

Thanks a lot,

Ruth

Reply
0 Kudos
Environnement_1Lausanne
Occasional Contributor

Hi Ruth,

Thanks for your reply. Unfortunately it still doesn't work. Here's the relevant part of my XLS form and report template:

begin groupadd_geological_layersDescription du prélevement
hiddenmax_depth_tocurrent depth
notelayer_listCouches documentées:
begin repeatnew_layerEntrer une couche:
decimallayer_topCommence à (limite sup.) :
decimallayer_bottomProfondeur (limite inf.) :
textdescriptionNature du terrain:
texttech_layerCoupe technique:
calculatelayer_widthlayer width
calculatecurrent_entry 
end repeat  
decimalwater_level<b>Niveau d'eau<b/>
end group  

Largeur de couche

Profondeur

Niveau d'eau

Nature du terrain

Coupe technique

${#new_layer}${layer_width}

${layer_top} - ${layer_bottom}

${water_level}

${description}

${tech_layer}${/}

Thanks for your help!

Cheers,

Flo

Reply
0 Kudos
Ruth_JiatengXu
Esri Contributor

Hi Flo,

Thanks for the additional info, I created a survey and a template based on the info you provided, and here is the screenshot of my feature report template. Note the Form_17 is the main layer name of the survey that I created, and you need to replace that with your main layer name. 

The main layer name can be found in Feature Report panel -> Manage templates -> Upload new template -> Under the Howto create a template gray box. Or you can find it on the feature layer overview page on the AGOL.

Feel free to reply if this not work for you. 

Thanks,

Ruth

Environnement_1Lausanne
Occasional Contributor

HI Ruth,

Thanks heaps for your help, works like a charm!

Best greetings,

Flo

Reply
0 Kudos