I am limited in my JavaScript coding abilities. I am building a rather large homeowners insurance application that ultimately computes the premium. There are a ton of options that affect costs and I need a way to store a few numeric values. LC Designer doesn't appear to allow numeric variables (only string variables). As a work around, I have started to setup some hidden numeric fields to store some values and have their values change according to the users actions. I think this is going to work but is inefficient--the PDF ends up containing a lot of information about these hidden fields that is totally irrelevant to the task being asked of them. I thought I should ask a couple of questions before I get too far down the path I am taking.
My question #1: what are the other caveats in doing it this way?
My question #2: is there a better way or work-around that is relatively easy to do? (I am not stupid, but I am not much of a coder either). If someone could provide an example of something that can act like a numeric variable (easily accessed & changed) I would be most grateful.
Solved! Go to Solution.
Views
Replies
Total Likes
If I do a serach in the Designer Help there is plenty of information on variables. It talks about creating them, their scope and even gives examples. The only thing it doesn't talk about is your question about arrays. The var cannot hold an array ...but I have seen people use a scripting object to define the array for global use.
Paul
Views
Replies
Total Likes
Using hidden fields to store temporary values is quite common. How many hidden fields are you using? How many do you think you need? I would be too worried this making the form "inefficient" unless the number of hidden fields is quite large.
My two cents
Steve
Views
Replies
Total Likes
I will be using about 5 to 8 hidden fields as variables.
Views
Replies
Total Likes
The other solution is to create global variables to hold your info (Form Properties/Variables) but from an efficiency perspective it ends up being the same thing.
Paul
Views
Replies
Total Likes
Don't worry... 8 fields are like nothing...
I have a similar issue due to the different number/date patterns of different countries. So I need to overgive the values and change the specific patterns in a hidden field. So I do have 2 large tables which don't matter much.
(After the mail with the xml arrives the difference between the formats 999,999 (other ways to write: Ger 999,999; Swiss 999 999) and 999.999 (other ways to write: Ger 999 999, Swiss 999.999) can't be detected.)
Views
Replies
Total Likes
Paul,
I have tried without success using the form properties variables tab for entering variables. There is absolutely no documentation on the specific manner in which this is done, or whether it can accommodate arrays. I mean absolutely no documentation that I can find other than references to the LC feature like: "enter variables in the variables tab of the form properties," period. Great! but tell me more please, like specifically how?
Other than the name of the variable and a value, are there supposed to be:
And, what about arrays? And, does it matter if these values are intended to be numeric?
I think I would prefer to use the variables tab because it centralizes their location, and in some cases I may need to change ones I might use as constants, down the road. This becomes much handier for that.
Stephen
Views
Replies
Total Likes
If I do a serach in the Designer Help there is plenty of information on variables. It talks about creating them, their scope and even gives examples. The only thing it doesn't talk about is your question about arrays. The var cannot hold an array ...but I have seen people use a scripting object to define the array for global use.
Paul
Views
Replies
Total Likes
Thank you! Paul I had thoroughly read the LC help and looked online as well, but my coding efforts fell short, and I couldn't make it work. Now, it works like a charm! And, it's so simple. I really am not certain what I was doing wrong, except maybe making it seem harder than it really was. But this is a great breakthrough for me! This helps tremendously. Stephen
Views
Replies
Total Likes
Views
Likes
Replies