Select to view content in your preferred language

Feature Report - Extract Repeat Field Data

3274
3
Jump to solution
12-28-2021 11:49 AM
BattJones
Occasional Contributor

I'm attempting to pull a specific field's data from a repeat into a feature report table. The table is a static list of all the possible values and I'm attempting to have a checkbox populate next to each value that was present in the repeat table.

For instance, I have values A01, A02, A03, A04, etc. If A01 and A04 were entered into the repeat table, then I'd like to have a checkbox show up next to the value in the static feature report table.

I've attempted to get this to work by using ${fieldname | checked: "value"} next to each value and including ${#repeatname} ${/} at the beginning and end of the table. I've also tried doing this with no table and without the repeat name, but can't seem to get it to work. The basic checkmark function will work, but the table or list repeats each time.

 

How can I pull out just the data from the repeat field without the table repeating? Thank you!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DerrickWestoby
Frequent Contributor

You are trying to print a single table for your entire report, and that table has a pre-set list of values that you want a check next to if ANY record in your repeat's related field contains, correct? 

If that's correct, I think there's two ways to do this.  

1. Don't reference the repeat in your feature report. Instead, have a hidden field in your XLS form (outside of the repeat) that returns a 1 if that  value is entered and a 0 if not.  You'd have to do this for every option that's possible.   This way, you could reference the questions outside of the repeat and not worry about your table itself repeating for each record in the repeat. 

 

2. Use the repeat summary/aggregate functions, along with a little bit of funny business in your feature report itself. 

${REPEAT_TABLE_NAME | where:”YOUR_VALUE = 'A1' " | stats:"count,objectid"}

The example above will reference a question in your repeat (and does not require the open/close tags for repeats) and will return a numeric value of how many repeat records have 'A1' selected.   Maybe you just want to print that number out instead of a checkbox, maybe not.  

If not, you could highlight that entire formula and change it to black text with a black background.  It won't be an actual checkmark, but you could give the appearance of a solid black box for non-zero values.  You'd still need to add an IF statement to only return values greater than 0, though (since this will still return a 0 for empty values).    But it'll allow you to access the counts in a single table without repeating the table for each. 

 

Check out this article for more information on the Aggregate functions in the feature report - https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereportqueries.htm

View solution in original post

3 Replies
DerrickWestoby
Frequent Contributor

You are trying to print a single table for your entire report, and that table has a pre-set list of values that you want a check next to if ANY record in your repeat's related field contains, correct? 

If that's correct, I think there's two ways to do this.  

1. Don't reference the repeat in your feature report. Instead, have a hidden field in your XLS form (outside of the repeat) that returns a 1 if that  value is entered and a 0 if not.  You'd have to do this for every option that's possible.   This way, you could reference the questions outside of the repeat and not worry about your table itself repeating for each record in the repeat. 

 

2. Use the repeat summary/aggregate functions, along with a little bit of funny business in your feature report itself. 

${REPEAT_TABLE_NAME | where:”YOUR_VALUE = 'A1' " | stats:"count,objectid"}

The example above will reference a question in your repeat (and does not require the open/close tags for repeats) and will return a numeric value of how many repeat records have 'A1' selected.   Maybe you just want to print that number out instead of a checkbox, maybe not.  

If not, you could highlight that entire formula and change it to black text with a black background.  It won't be an actual checkmark, but you could give the appearance of a solid black box for non-zero values.  You'd still need to add an IF statement to only return values greater than 0, though (since this will still return a 0 for empty values).    But it'll allow you to access the counts in a single table without repeating the table for each. 

 

Check out this article for more information on the Aggregate functions in the feature report - https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereportqueries.htm

BattJones
Occasional Contributor

@DerrickWestoby  - Thank you! I think that either of those should do the trick. I greatly appreciate the solution.

jantolihao
Regular Contributor

Hello, @DerrickWestoby.

I also have the same concern as BattJones. 

I have here a sample form (Sample Building Form.xlsx) with a repeat group. I am trying to generate a report using the attached feature report template (Sample Report Template.docx). However, I keep getting the same error above. So, I tried revising the report template. However, the output looks like this (please see screenshot below). I have attached the same generated output PDF as well (Sample Generated Report.pdf).

jantolihao_0-1667563442711.png

I noticed that each item in the "Additional Items" column were printed thrice. I only wanted to print every single item in the "Additional Items" column, whether they have entries or none, only once. I prefer to have an output something like this. (Please see screenshot below)

jantolihao_1-1667563443042.png

Do you have any suggestions on how to come up with this output? I did a couple of tests, but I couldn't figure it out how to revise my feature report template. Am I missing something out?

Thank you in advance for looking into it. I appreciate any ideas. Thanks again.

0 Kudos