Copy link to clipboard
Copied
I have a simple document with 6 lines, each containing 4 options represented by 4 checkboxes. I have each checkbox exporting a value of "1" so that, when selected, a table below the checkboxes calculates the total number of boxes selected for each option. the checkboxes are currently titled "G_1, G_2, G_3, etc"
ex:
My next hurdle, the question I need help with, is that in the "LOCATION #'S" table, I want the location listed (e.g. "Y: 1 ; R: 5 ; B: 6") not the value. Ideally, it would just list the number (i.e. "1" not "G_1"), although I know this may not be feasible.
any help would be MUCH appreciated, thank you!
Copy link to clipboard
Copied
I have two more documents like this one, with the same concept applied to more lines, 66 and 200+ lines respectively, and I will be applying this same logic to them.
Copy link to clipboard
Copied
You will of course need a script for this. Do you have any experience with JavaScript or programming?
By location, do you mean the Line Number of the first selection?
If so, then there are few ways to approach this. But the easiest is to simply loop through the possibilities, 1-6, and then save the line number where you get the first check for each different type.
Copy link to clipboard
Copied
I am learning JavaScript right now, but I am still pretty new. By location I mean the line number. Do i need to group the lines as a single object, or will the loop still work?
Copy link to clipboard
Copied
No grouping is necessary, but the fields need to be named in such a way that they can be easily identified by the script for automatically generating field names. The "location" name you want displayed needs to be part of the name. Group naming is only helpful if it simplifies scripting, which I am sure it would for some of what you are doing, but the important part is that the field names can be generated in a way to meets your goals.