Hello all. I have a question that I am very stumped on. I know very little about scripting, but I really like LiveCycle. I am currently using LiveCycle Designer ES4, Version 11. I have successfully created a form that I can add full pages to by clicking on "Add Page" using the Instance Manager. However, I am needing the form to function as follows:
1. The alpha character needs to increase by one for each page added (A, B, C, D, E... etc.).
2. I have limited the dynamic rows for "Volunteers" to 3, and I would like to have the "Printed Name(s)" show up on the pages that are dynamically added so that they don't have to retype it on each page.
The only area that needs to be dynamic is "Volunteers". I want the user to be able to add as many pages as needed (A, B, C, D+), and each page will propagate the information from "Volunteers" to next page(s), but each occurrence of the page need only be a static page length. (ie... Page 1 will contain information for item "A", Page 2 will contain information for item "B", etc. And those individual item pages should only be one page length.)
Any help at all would be so much appreciated. I have been researching and testing this form using different methods that I have found here, but I just can't find a solution to these problems.
(I tried to upload this file, but I am getting the error "You are not allowed to create or update this content"?? So, I have attached an image of the form, which will do little good I'm sure.)
You can generate the letter you need with the following code in the calculate event of the TextField object (if you are using a Text object you may need to change it and make it protected and remove the caption)
String.fromCharCode(65 + Page1.index);
This assumes that Page1 is the thing that repeats.
Not sure I understand the volunteers printed name bit. Are you saying the names are enter on the first page and then copied to every subsequent page. If so it probably depends how you structured your table., If you have Row1, Row2 and Row3 objects then in their calculate events you could have code like;
Both of your suggestions worked perfectly. I was able to limit the number to 26 and to have the numbers after Z start AA, AB, AC, etc.. I can now give my users a choice in how they want their form to look. Thank you again so much for all of your help. I really appreciate it!
Seriously... YOU ARE THE BEST! Wow. I am going to give this a try as soon as I can.... but it might be Monday b/f I can get to it. I just have to say thank you so much for all of your help! I wish there was a way I could pay this forward, but I'm afraid my scripting knowledge is limited to scouring the internet and this wonderful community that has helped me so many times.
I hope you have a wonderful weekend, and I will let you know the outcome of your generous help.
This way there's a few extra options, you can change the 'format="A"' to 'format="a"' for lower case letters, or 'format="I"' for roman numbers, or 'format="001"' for 3 digit numbers with leading zeroes.
Is this sequence ok or do you need it to go "AA", "BB", "CC", etc.
Sorry to be a pest... I do have one other question, and I can make it work without the answer, but I thought I would at least ask 😕
Is there any way to retrain the string Unicode statement so that it will only go to 'Z', or, better yet, if it does go past 'Z', to do 'AA', 'BB', 'CC', etc., in-case they need to print more 26 pages for their location identifications?
THANK YOU SO, SO, SO MUCH! You have no idea how much this helps me out! Your answer is perfect and is working flawlessly.
To answer your question about the "Volunteer" area... I actually had it as a row that could be dynamically added up to three times, and also deleted or moved up or down the list, but with your solution, I just made three static rows. I think that will work for them just fine. My biggest hurdle was the incremental letters on dynamic page add. I could not figure that out for the life of me! Your answer has made my whole day. Thank you again so much!
PS.... with your help, I have also added that repeat coding to the header text fields