Expand my Community achievements bar.

SOLVED

Writing variable value to a textfield during(not at the end of script) script.

Avatar

Level 3

Hi,

May be this is a stupid question, but I need to know the answer.

The question is

Is it possible to write a variable's value to a text field or numeric field during or in the middle of a script, not like at the end of script. Actually I found that live cycle designer forms writes values to fields when event script finishes.

I tried on a click even of a button.

TextField1.rawvalue  = "5" ;

xfa.host.messageBox("test message");

But code shows alert message first and then writes the value afterwards. When alert windows pops up text field is having old value or say blank.

Thanks

Arvind

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Arvind

You could try using the layout:ready event, you just need some way of working out what the next step is, maybe for form variable you can increment each time the layout:ready event is called so you know to write out the next thing.  There is an example of this in a sample here Adobe LiveCycle Designer Cookbooks by BR001: Season Planner (or Year Planner) PDF Template

Regards

Bruce

View solution in original post

3 Replies

Avatar

Correct answer by
Level 10

Hi Arvind

You could try using the layout:ready event, you just need some way of working out what the next step is, maybe for form variable you can increment each time the layout:ready event is called so you know to write out the next thing.  There is an example of this in a sample here Adobe LiveCycle Designer Cookbooks by BR001: Season Planner (or Year Planner) PDF Template

Regards

Bruce

Avatar

Level 3

Hi Bruce

Though I did not fully understand your reply but you gave me an idea how to do that. I use global variable that solved my purpose what I was trying to do. There is yet to learn more about layout:ready even. It would be appreciated if you give me some brief.

Thanks

Arvind