So I have a public survey that is intended to collect information in a standardized format that then fills in a pre-defined form. This sounds like a Survey123 and associated report template.
I am running into a few issues.
Any advice would be appreciated to fix these issues. Thanks in advance!!
Check out this tips and tricks page on calculation modes. It might help you with the repeat pulldata problem. You might need to add calculationMode=always or calculationMode=whenEmpty to the bind::esri:parameters column for each of the fields using pulldata in the repeat. You'd have to test this in the app rather than the webform to see if that solves the problem. At the time of the article (2022) calculation modes other than auto don't work on the webform, but at the end of the article they talk about adding parameters to the survey URL to get the similar behavior.
In your report template, the way you have it formatted with the Well repeat will just create a line of text with the repeat values. If you want a list where each repeat has its own line, I would insert a 1x1 table and turn off the borders, or just leave the bottom border on to mimic underlining. Calling and closing the repeat in the table will create a seamless table, you can leave the borders on to test and see how it works.
It should look like this:
${#Well}${legal} ${STR}${/} |
I went through the calculation modes with no improvement, but it was definitely worth a shot. I think I'll keep those in mind for other internal surveys. The weird thing with this public survey seems to be the difference in how the web browser and app interpret the xlsx form. When using pages, the survey worked fine in the app but in the web browser the repeat sections were disabled and any information entered into those repeat fields would not populate the child table.
The pulldata function seems to be another victim of the different behavior between the web browser and the app. In the app, the pulldata function works just fine for each repeated feature. This is critical for this particular survey as it is designed for public use and I don't anticipate the end users to go through the process of downloading the app in order to use the survey.
I also appreciate your thoughts on the report template. Ideally I would like the repeated values to be in a comma separated list: legal 1, legal 2, legal 3 etc. From my testing, I can't get the table suggestion to flow horizontally. Rather it flows vertically. For many cases this would not be an issue but some would have multiple legal descriptions, creating several rows and wasting a lot of page real estate in the process. I've read about this behavior from other users too (example). Open to other ideas though!
That's funny, when I created my own test form and report template with the ${#Well}${legal} ${STR}, ${/} format like you had, it worked as you were wanting it to. Looking at the format of your docx, you might try it without the tab after to force the underline all the way across the page and see what happens.
I do have a workaround for the repeat + not showing on the web form with pages. If you create a group for the page and then stick the repeat inside the group, then it will work.
I think we are making good progress here!
In the report template, I couldn't get the table to layout horizontally. However, I did take your suggestion as a jump off point. I added a tab before the ${/} tag. Then I added two tab stops within the same line to add a little buffer space between repeat records on the same line. While this isn't perfect as it will get weird with long legal descriptions or more than 3 legal descriptions, it is much more readable now while minimizing space. Item 3 from original post is good now
I took your suggestion on adding a group wrapper around the repeat sections in the xlsx form. After playing a little with the grid layout within those groups, I got it working. This worked for what we're needing! Item 1 from original post is good now
Now to figure out how to get the pulldata to work within the repeat and we should be good to go!