I have a large form that contains over 50 pages. The first page is a flowable user input form.
There are several fields which are common with other fields in the various underlying hidden pages. When a user selects an account type from a dropdown list, the appropriate account opening checklist appears as page 2.
The user then selects various checkboxes which then makes the appropriate additional pages visible. Thes additional pages contain fields that should autopopulate based on the data entered in page 1 input form.
The fields that are globally bound are fine. The problem is fields where I need to script to autopopulate. For example, there is a ACH authorization distribution section with 2 checkboxes (one for Checking one for Savings) and one Account number field. The page for ACH data, shows the ABA and Bank Name fine since those are globally bound, but the account number is 2 separate fields that I need to script in order to fill in but it is not working correctly.
I think it is the event I have used but I'm not sure which event is best to place the script in. I started in the initialize event of that page but that doesnt work. If I click the checking/savings checkbox again after the ach page is visible, the field populates.
How do I get the field to be prefilled as soon as it becomes visible?
I am very new to scripting and LC. Any suggestions would be greatly appreciated!
If you are new to scripting I might suggest using the Action Builder. It is a set of prebuilt actions that do not require scripting. If you are using Windows go to the toolbar at the top, go to Tools and select Action Builder. From there you set a condition and a result. From the condition select what field is going to hold the value you want to be copied and select "is not empty" from the first drop down box. Then in the result section select "set value of field" and then select the field that you want the data copied to. In the result section you will then select from the drop down box what you want the value to be and you select "to the value of field" and select your 1st field. This will mirror 2 fields or even multiple fields from 1 box without global binding. What is nice about the Action Builder is if you go to the Script box at the top you can see Livecycle will populate the actual code on the correct show event. This way you can start to see how the code works and build from there.
I have been using the action builder somewhat, but for some reason was not getting it to accept a second AND condition.
I got it working now. Other issues now which I'll post separate questions.