Copy link to clipboard
Copied
Good day,
I'm troubled with some issues regarding Excel cells that needs to filled in by javascript code that's filled in the acrobat tab Custom calculated script. Normally I use this script for a pricelist thats been made up in excel. This code is:
var Waarde_1 = this.getField("Waarde_1");
followed by:
Waarde_1.value = "....";
This works fine with the price lists, but the data for new documents, technical specifications, contains more detailed information and sometimes complete sentences. I always get a syntax error. How can I best do this?
HI,
The technical specifications are strings and therefore have to be enclosed in quotes "".
For example:
Waarde_1.value ="Not filled in";
Regards
Malcolm
Use something like this:
Waarde_1.value = "";
Waarde_4.value = "T137-31,5";
Copy link to clipboard
Copied
HI,
Are you able to provide a sample document, so that we can see what you are trying to do and where the problem might be, I am having issues understanding what you are doing and therefore what the problem is.
Regards
Malcolm
Copy link to clipboard
Copied
Hey Malcolm, and Bernd,
I'll try to explain with below which is the same order i do normally for pricelists. in that case Waarde_no. is Price_productno. This goes via the code below that is generated with excel. The values (such sT137-31,5 or Not filled in) are the output of numerous calculations in Excel.
I want to create a more designed quotation instead of a simple MS Word letter with pricing. The design for this was made in Indesign. Samples of what i'm doing are shown below.
The codes are copy pasted in the javascript-editor.
What bothers me is that it works fine when it comes on pricinglist as shown below, the only thing is different are that these are numbers only.
Copy link to clipboard
Copied
HI,
The technical specifications are strings and therefore have to be enclosed in quotes "".
For example:
Waarde_1.value ="Not filled in";
Regards
Malcolm
Copy link to clipboard
Copied
Thank you Malcolm! This works! How little small things can do the trick... once again many thanks.
you also Bernd_Alheit
Copy link to clipboard
Copied
Use something like this:
Waarde_1.value = "";
Waarde_4.value = "T137-31,5";
Copy link to clipboard
Copied
Use this:
var Waarde_1 = this.getField("Waarde_1");