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
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
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 group | add_geological_layers | Description du prélevement |
hidden | max_depth_to | current depth |
note | layer_list | Couches documentées: |
begin repeat | new_layer | Entrer une couche: |
decimal | layer_top | Commence à (limite sup.) |
decimal | layer_bottom | Profondeur (limite inf.) |
text | description | Nature du terrain: |
text | tech_layer | Coupe technique: |
calculate | layer_width | layer width |
calculate | current_entry | |
end repeat | ||
decimal | water_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
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
HI Ruth,
Thanks heaps for your help, works like a charm!
Best greetings,
Flo