If the only thing you want to do is get the value in the field there is no reason to use getField() to get the AcroForm field. Just query the field directly in FormCalc and get the rawValue. IE: fieldName.rawValue.
You can read about the syntax of the for loop in FormCalc on page 23 of the FormCalc reference which is installed in the documentation directory of Designer.
I did not think FormCalc supported what I needed but I was hoping I was wrong and therefore hoped to avoid having to query the field directly because the area I am working over basically equates to a 2 dimensional array (but its is not actually one) with a considerable number of fields, I was hoping not to have to hard code the field names for direct access, but if I must, I must, since in need FormCalc functions in part of my validation ( I use parse and format, as well as R&Ltrim) before the calculations.
I check page 23 for the FormCalc reference guide which comes with 7.0 and it talks about how to access elements in a tree, not the syntax of a for loop. If you have a simple example that would suffice.
Sorry, it's page 23 in the reference that comes with Designer 7.1. In any case, here's an example:
var List = ref(xfa.record.lists.list1)
for i=0 upto List.nodes.length - 1 step 2 do
Also take a look at the resolveNode() and resolveNodes() to reference nodes without hard coding full paths for them. There's still no need to to use getField() and work on the AcroForm widgets if all you want is the value, and I strongly recommend against not working on AcroForm widgets unless there is no other way.
simple simple simple question..... first time user here, I have multiple objects that contain #'s. I'm adding those objects to display in another object called "total". Each time I add a number to the form, the total object remembers the last total and adds all the numbers yet again. How do I code this to simply add the numbers that are displayed (just like excel would do)?
Thanks Chris! I havent been able to get back to the forum shortly after I sent that email, I discovered a typo in one of the field names I was using. The behavior was so unique it appeared intentional!
My mistake, thank-you for responding.
As a side note, Ill never make another form in anything but LiveCycle Designer! Very powerful & easy with a little persistence.
On a similar note, I've created a form by importing a Word Document into LiveCycle. I've got all my sum calculation to work and using the sum function have been able to reference the values in non-congruent objects.
Now I'm trying to do that with text fields but can't figure out how. I just want the applicant's name to repeat throughout the form (where required) when it is entered at the top of the first page.
I can not find the FormCalc script for this anywhere. I don't imagine it is very elaborate.