I was also curious as to the naming convention that is applied to dynamic fields. For instance in one of my documents I have a field named “naics_code”. This field is dynamic in that the user can add an additional instance. What would the field name of additional instances that were added by the user? naics_code-1, naics_code_1? Thanks.
When adding instance of an object within LiveCycle, objects are created and renamed with the index based value using square brackets.
If you want to access to the different instances of the object naics_code, you should try resolving the node using the following reference_syntax :
Hope this will help.
Thanks for the reply. Unfortunately I still have some additional questions because I've very new to Adobe LiveCycle. I've also attached an example.
I'm still a bit confused on how the original field name is handled. If no additional NAICS Code fields are added, the original filed name is naics_code. If an additional NAICS Code field is added, is the original field name changed? I'm trying to determine what the field names are so that we can eventually extract this information from the pdf document and then map that information back into a database.
It appears that the code you've provided me above helps me to set a number for additional fields, but my concern is that the original field name may itself change based on if the user adds a new field or not. This will definitely make mapping a bit more challenging. Thanks for all the assistance.
either way, if you only have 1 instance or more, the somExpression of that first object will still be named naics_code, no matter what, but only within the somExpression
Thanks for the response. I just wanted to confirm that I've read this correctly. Regardless of if the field is dynamic or or not, the syntax would be "field name" = , although within the tool it really only shows the field name. If you have additional instances of that field, then the digit within the brackets would increase at a rate of 1. Is that correct?
I think I now see this information under the Object -> Binding -> Name section, but I just wanted to confirm. Thanks again.
This is correct, although as I said this is only for the somExpression property
if you choose to retrieve the name with the property name, it will not show you the bracket with number
So if you want to retrieve only the name with the number within bracket you can use the following :
Are you suggesting that I need to use - xfa.host.messageBox(naics_code.somExpression.split(".")[naics_code.somExpression.split("." ).length - 1]); - to lock in the  value? I'm just curious to how an external system will read the form. I believe my firm will be using Fusion to pull the data off the completed form and not sure if the code above is needed to display the correct syntax or if you're just showing me different options you have at controlling it.
You will need to test, I'm only showing different options within LiveCycle for you to understand there is a difference between the name and the path to access the object.