Highlighted

Working with percentages, multiple feilds, and dynamic updating

Avatar

22-07-2008

Hello.



I am a LiveCycle newbie with limited experience. I have some database and scripting experience on other platforms, such as Access.



Currently, I am trying to quickly knock out a form in which the user can allocate their time, as a percentage (xx.x%). There are 25 categories in which the user may allocate a portion of their time.



I would like to have a "Total" field, which starts at 100%. This total decreases as the user allocates time to one of the 25 categories, so the user may easily see the remaining percentage of time available to allocate, and by inversion see how much they have used.



Having no experience with the scripting behind LiveCycle (Cold Fusion?) I am searching the Adobe site for support which may apply to my problem, but it seems like I have a lot of background knowledge and sub-topics to go through before I find my final solution.



I was hoping one of you might be able to give me a jump-start.



Regards,

Ben Rebach

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

22-07-2008

It is all just JavaScript so it is a case of retrieveing a value from a field performing an arithmetic operation then putting the results into a field. To read or write to a field you will use the objectname.rawValue. Note that you can path your way from the root of your form to get at the field if you have a complex hierarchy (i.e. form1.Page1.Subform1.fieldname.rawValue.



There are samples in the EN folder as well as a tutorial that ships with the product that will help you.