Copy link to clipboard
Copied
Is there any way of writing a script which might help me do this?
I have 40-odd pages of boxes and checkboxes. The boxes are under 5 different headings, and 3 different colours. So, for example the headings are A, B, C, D, E and the boxes themselves may be coloured green, blue or orange.
I want to create a calculation which adds up the following:
Green boxes under Headings A-E
Orange boxes under Headings A-E
Blue boxes under Headings A-E
I appreciate I can do a calculation and add the individual check boxes, but right now I need to do that on 2 different screens as I can't see the list of field names along the right hand side when i'm trying to add them to the calculation. So I have to keep checking them and going back. Is there a quicker way to do this at all please? Ideally, I'd be able to see the field names where they appear in the document when I am adding them to the calculation. (I should have added the heading and colour when I started putting in the field names, but I didn't and I really can't do the whole thing again!)
Thanks.
Copy link to clipboard
Copied
You can copy the fields names and then use the Simple Field Notation option under the Calculate tab to set up the sum, simply like this:
FieldA+FieldB+FieldC
etc.
However, if those field names contain a space you have to escape it, like this:
Field\ A+Field\ B+Field\ C
Copy link to clipboard
Copied
Thanks very much. I've managed to put all the fields into the script but it adds up to 10 and goes no further, even though there are many more tasks than that. I have put in the \ instead of a space and also tried the \ AND a space, to no avail.
Having done a search, I also have changed all words into lower case.
I get this error:
SyntaxError: missing ; before statement
1:Field:Calculate
SyntaxError: missing ; before statement
1:Field:Calculate
SyntaxError: missing ; before statement
1:Field:Calculate
SyntaxError: illegal character
1:
SyntaxError: illegal character
1:
SyntaxError: illegal character
1:
SyntaxError: missing ; before statement
1:Field:Calculate
SyntaxError: missing ; before statement
1:Field:Calculate
SyntaxError: missing ; before statement
1:Field:Calculate
SyntaxError: missing ; before statement
1:Field:Calculate
The calculation is:
field\trigger.0.0.0+field\trigger.0.1+field\trigger.0.2+field\trigger.0.3+field\trigger.0.5+field\trigger.0.0.1.1+field\trigger.0.0.1.3+field\trigger.0.0.1.4+field\trigger.0.pg7+field\trigger.0.27+field\trigger.0.57.1.0.1.0+field\trigger.0.57.1.0.1.5+field\trigger.0.10.1+field\trigger.0.10.5+field\trigger.0.10.0.1.1+field\trigger.0.10.0.1.0.1.1.0+field\trigger.0.13.1+field\trigger.0.14.0.1+field\trigger.0.14.0.5+field\trigger.0.15.0.0.3+field\trigger.0.16.0.3+field\trigger.17.0.1.3+field\trigger.0.18.3+field\trigger.0.19.01.3+field\trigger.0.20.01.0.1+field\trigger.0.21.01.0.0.0+field\trigger.0.22.0+field\trigger.0.23.0+field\trigger.0.24.0+field\trigger.0.24.5+field\trigger.0.25.4+field\trigger.0.26.4+field\trigger.0.0.28.1+field\trigger.0.0.29.1+field\trigger.0.0.30.0+field\trigger.0.0.30.3+field\trigger.0.0.31.2+field\trigger.0.0.31.4+field\trigger.0.32.3+field\trigger.0.33.0+field\trigger.0.0.34.+field\trigger.0.0.35.0+field\trigger.0.0.35.4+field\trigger.0.36.0+field\trigger.0.0.37.2
Thank you for any advice you can give!
Copy link to clipboard
Copied
You're missing the actual spaces after the back-slashes.
Copy link to clipboard
Copied
I put them in first, and when I got the "10" result I took them out, but that didn't change anything.
Copy link to clipboard
Copied
Well, you must put them if the field names actually contain a space. Can you share the file?
Copy link to clipboard
Copied
I put the spaces back in but still had the same result. I would like to share the file but as it's work-related I don't think it'd be wise to share it publicly - would it be possible to share it privately with you at all please? Thank you again for your continued help.
Copy link to clipboard
Copied
Are you still getting console errors after following @try67 's instructions?
Copy link to clipboard
Copied
Yes, that's what I got after following the instructions. I get the same result with or without adding a space.
Copy link to clipboard
Copied
Are these all check boxes and do they all have numbers as export values?
Copy link to clipboard
Copied
Yes they do.
Copy link to clipboard
Copied
Now something has gone majorly wrong as I'm trying to repair a formula in another unrelated cell and not only do I keep getting that Javascript message, when I try to select fields to add to the calculation none of them show. 😞 😞 😞
Copy link to clipboard
Copied
Again, please share the file.
Copy link to clipboard
Copied
As I said in response to your earlier message, this is a work document so I'm nervous about putting it on a public platform. Is there any way i can share it privately please? I am in such a mess, I don't know what on earth is going on.
Copy link to clipboard
Copied
You can email it to me, to try6767 at gmail dot com.
Copy link to clipboard
Copied
Thank you so much - winging over now!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more