Hello,
I'm trying to get the value from an xml file and then adding conditions to those values. The code I have goes something like this:
for some reason, it is not getting the value.
If the value of the field "vehiclOfNonVehiclFlag" is V, then "N° de chassis: " should appear in the "nrSerieChassisTextField" field. If it's "N", then N° de serie should appear in the "nrSerieChassisTextField" field.
Now the field just remains empty and I have no idea how to resolve this. Here is a snap from the XML file:
The field I am using, "vehiclOfNonVehiclFlag", currently has the value "V" in the xml file.
Please help
Kind regards
Views
Replies
Total Likes
Additional info: The "N° de Chassis" or "N° de Serie" will appear in the left box of the text field. The right field will be filled in using a binding.
Views
Replies
Total Likes
re-up !
Views
Replies
Total Likes
Hi,
Can you provide the code for your getElementById() method?
This approach of dynamically adding methods to the XFA objects can cause problems as unless you set the form to the old style garbage collection, clearing "Enforce Strict Scoping Rules in JavaScript" they can get removed at anytime.
And in this case it seems like you just want to use the standard resolveNode() method?
Regards
Bruce
Views
Replies
Total Likes
Hello,
Thank you for replying!
I tried changing the code to the following, eventough without any succes:
I tried solving this issue with the Action Builder, which in some cases helps, but unfortunately it does not work in this case.
Kind regards,
Jens
Views
Replies
Total Likes
Hi Jens,
If your value is in the data DOM you need to use something like;
xfa.datasets.data.resolveNode("publishingBatch.publishingSubRequest.functionData.vehiclOfNonVehiclFlag").value
Regards
Bruce
Views
Replies
Total Likes
Hi Bruce,
I tried but the caption still remains empty, here are some more screenshots of the result:
The correct xml is uploaded in adobe, so I don't know why he doesn't fill up the caption :/
Kind regards,
Jens
Views
Replies
Total Likes
Hi Jens,
I might be easier if you could upload the pdf version of your form (or the XDP and XML), maybe to Google docs or somewhere, and add a link to this thread so I can have a look.
You do seem to have two ".data" element references in your expression now, one inside and one outside the resolveNode method, maybe that's all the problem is.
But without seeing the form it is hard to say for sure.
Regards
Bruce
Views
Replies
Total Likes
Views
Likes
Replies