Instance Count + Display

Avatar

Avatar

matthewl3726698

Avatar

matthewl3726698

matthewl3726698

16-03-2016

Hi, i currently am having an issue with getting the instance manager to count and display the current number of subforms.

I have a TextField called TextField117 in a subform Called Row24, which is in a subform Called Set2.

I also have a button called Button 1 that creates a new instance of Set2 every time it is clicked.
What i am trying to do is that TextField117 gets automatically filled with the # each time the button is clicked, so in the very first set2(the original) it'll display 1.

Then when the button is clicked, it will create another set2 which has it's own textfield117, and i want that textfield117 to display 2. ( a counter). and so forth... 3, 4... 5.. 6..


If there is anyone that could help, i would appreciate it. thank you!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Magus069

MVP

Avatar

Magus069

MVP

Magus069
MVP

16-03-2016

HI there,

if you set TextField117 to Calculate - Read Only, and put code within the calculate event you can have the field show the value wanted

within the calculate event, you can write the reference_syntax needed to access the parent set2 and retrieve the index with the following :

Depends how many parents there is to access set2, you will have to adjust according to the hierarchy...

Hope this will help

Answers (7)

Answers (7)

Avatar

Avatar

matthewl3726698

Avatar

matthewl3726698

matthewl3726698

17-03-2016

Hey magus, thanks for replying, yes I still need some assistance, can I get your email?

Avatar

Avatar

Magus069

MVP

Avatar

Magus069

MVP

Magus069
MVP

17-03-2016

Hi again,

I'm sorry I totally forgot to answer back yesterday, if you still need assistance I can either send you my email in private message or you can send a link for me to download the PDF file.

Avatar

Avatar

matthewl3726698

Avatar

matthewl3726698

matthewl3726698

16-03-2016

Uhm could i send you the form and show you what i mean? it's difficult for me to explain it properly

Avatar

Avatar

Magus069

MVP

Avatar

Magus069

MVP

Magus069
MVP

16-03-2016

You can also use the index for your purposes if I understand well your needs

Let's say your table is named Table1 and row is Row1...

Something like this could do the job if this is exactly what you are looking for

Avatar

Avatar

matthewl3726698

Avatar

matthewl3726698

matthewl3726698

16-03-2016

Theres one more bug ive been working on, i'm trying to replicate the information inputted in to a table outside of the set2 subform , to replicate into the table in set 2, and add instances of row 1 ( in the table outside of the set2 subform)  (which also adds instances in to the table inside of the set2 subform) I dont want to use global binding data because it will affect each row made after with the add instance button and i want them to have different text fields so that the user can input the next row of information which is automatically copied into the set 2 table.

Avatar

Avatar

matthewl3726698

Avatar

matthewl3726698

matthewl3726698

16-03-2016

Thank you magus069, it worked really well!

Avatar

Avatar

George_Johnson

Avatar

George_Johnson

George_Johnson

16-03-2016

Since this is a question about an XFA form, I'm going to move this to the LiveCycle Designer forum: LiveCycle Designer