When I view the XML source of my form I see the following lines:
<desc>
<text name="version">1.1</text>
<text name="creator">Al Clawson</text>
<text name="issued">2/3/2011</text>
<text name="created">2/1/2011</text>
</desc>
There is any way I can refer to these strings in calculated fields? Specifically I want a small text field in the footer that displays the version of the form being used at the moment.
Solved! Go to Solution.
Views
Replies
Total Likes
Looking at the XML, the logical reference is: form1.desc.version
form1.desc.version //FormCalc it works!
Views
Replies
Total Likes
Looking at the XML, the logical reference is: form1.desc.version
form1.desc.version //FormCalc it works!
Views
Replies
Total Likes
this = form1.desc.version; //JavaScript also!
And in today's lesson I also learned that if your form name has a hypen in it then the script
txtFooter = concat("this is version ", form-name.desc.version)
will drop the "-name" and say that "form" is an invalid accessor. Everything else work work just fine, and changing the - to a _ fixes the problem, but still.....
Views
Replies
Total Likes
I believe "form" is a reserved word
Views
Replies
Total Likes
I tried it with a couple of words after the "-" and it is something about that character that causes it to protest.
Views
Replies
Total Likes
Hi,
The hyphen can't be used in a variable name in JavaScript, but if you want one in your form name then you can reference the version metadata value with
the xfa.resolveNode method
So;
txtFooter = concat("this is version ", xfa.resolveNode("form-name.desc.version").value)
Bruce
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies