I have a document with multiple section headings using alpha-numbering (A, B, C, etc.). Is there a way to create an automatic numbering method so that if some sections are hidden or revealed by user choices the sections renumber automatically? (i.e., if Section D becomes hidden, I want Section E to change to Section D, and so on, just like heading numbers in MS Word.) I'm attaching a screenshot of a sample section header here. I've looked up info on floating fields but haven't been able to figure out how to make them work. Thanks for any help!
Thanks for offering, I'll have to look into that because it's for a government agency; not sure if they allow it to be distributed. I'm kind of stumped, because the numbers reset only when it goes to a new form page.
The code wont be effected by which pages the subforms fall on just the order they appear in the hierarchy within their parent subform. The "@" is the ascii character before the "A" character so you might need a "+ 1" somewhere. Happy to have a look if you can add a link to your form into this thread,
I forgot to include in my previous reply: these are independent subforms, not automatically generated or anything like that. The numbering seems to work even if a page extends onto a second page due to large content in expanding fields, but as soon as the next actualy page starts, the numbering goes back to "@" and the "A, B, C....". It seems the counter doesn't retain its value when going to a new page. I tried many ways to fix it, but I don't understand the properties well enough.
Amazing; I could never have figured that out. I created a floating field called "SectionNumAuto" at each position where I need the number, and added your script to the "calculate" event for each instance. The script works, except that on the second page and subsequent pages, the first heading on each page has an "@" for the number, and then numbering starts again at "A". I tried adding "form1" and "parent" in front of the "parent" property in the script, but it didn't work. I also tried the changes below, and just couldn't get it to work: