I'm creating a form, and i already have 5 drop down boxes that are bound to 5 other text boxes that generate numbers based on each selection. This gives me a 10 digit number for purchasing. (2 digit- 1 digit - 4 digit - 2 digit - 1 digit) My question is, can one text box be bound to the 5 drop down boxes, so that when it generates that number, its all in one single text box and can be selected for copying and pasting in another program?
thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Also, I would not use a minus sign as part of an object's name (eg: BRANCH-DEPARTMENT_INPUT).
This will cause problems with referencing objects and the object name will need to be resolved.
Niall
Views
Replies
Total Likes
Hi,
You can do this by converting the rawValue from each of the five objects into strings. See toString() method.
this.rawValue = purchasing1.rawValue.toString() + purchasing2.rawValue.toString();
I am also fairly sure that if you place a "" in the script, that LC will take all inputs as strings, so something like this might work:
this.rawValue = "" + purchasing1.rawValue + purchasing2.rawValue;
Good luck,
Niall
Views
Replies
Total Likes
thanks, but i still need a little more assistance (i'm pretty new to doing forms). I'm assuming that goes in the script editor for the new text box, but under which event? thanks
Views
Replies
Total Likes
And what if you do not want the raw data, but the value that is bound to the raw data?
Views
Replies
Total Likes
Hi,
You would place this script in the calculate event of the object where you are setting the 10-digit number. Please note that both examples are JavaScript.
A dropdown has up to two values: the display value and the bound value. If you do not set the bound value (in the Object > Binding palette) then the object's rawValue is the same as the display value. If you do set a bound value then when you access the object's rawValue the bound value is returned.
The "rawValue" is JavaScript syntax to access the unformatted value of the object.
See an example here: http://assure.ly/fYCuQ2, which tries to explain this.
Niall
Views
Replies
Total Likes
I'm still very confused about this. Here is exactly what I need.
I have 4 drop down lists:
COMPANY_INPUT
BRANCH-DEPARTMENT_INPUT
GL_ACCOUNT_INPUT
SEGMENT_OF_GL_INPUT
I have 1 text box:
gl_line_number_output
Each drop down list has data binding to spit out a numbered code. I have each drop down list bound to a different text field. What I want to do is direct the bound data from all 4 drop down lists into one text field instead of seperate ones, listing the bound data in succession, to create a complete account number from all 4 drop down lists. The name of the text field I would like the binding to be directed to is called gl_line_number_output.
I've just started using the LiveCycle software and need someone to write a code exactly as it would appeare if I were to copy and paste it onto script editor.
Thanks you much,
Steve B
Views
Replies
Total Likes
Hi,
Here is an example: http://assure.ly/sd4fgZ.
One covers FormCalc, which uses the concat function and is probably easiest to follow.
The other uses JavaScript and checks to see if a dropdown is null first.
Hope that helps,
Niall
Views
Replies
Total Likes
Also, I would not use a minus sign as part of an object's name (eg: BRANCH-DEPARTMENT_INPUT).
This will cause problems with referencing objects and the object name will need to be resolved.
Niall
Views
Replies
Total Likes