Hi All, I have managed an "Invoice template" similar to attached sample.
What I need is, each time I change currency (by related drop-down list) I need all instances locale to change set currency.
Change currency "drop down" includes neccessary script for the 1st row. However for sub-rows added by instance manager, it does not affect the locale change.
If any one please help me to add neccesaary script to attached sample I can understrand easliy.
Best Regards,
https://drive.google.com/file/d/19f1Iph4g880juw5cDvUIWhtORJRb-DWT/view?usp=sharing
Solved! Go to Solution.
Views
Replies
Total Likes
Try setting the local properties something like
var oFields = xfa.resolveNodes("form1.Table1.Row1[*]"); var nNodesLength = oFields.length; var nSum = 0; for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { oFields.item(nNodeCount).UnitPrice.locale = "en_GB"; oFields.item(nNodeCount).TotalPrice.locale = "en_GB"; }
Maybe create a function with the locale as a property, so you can reuse in your switch.
Also, there is
form1.Table1.Footera.Subtotal.locale = "en_GB";
I don't see Footera anywhere on the form.
Try setting the local properties something like
var oFields = xfa.resolveNodes("form1.Table1.Row1[*]"); var nNodesLength = oFields.length; var nSum = 0; for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) { oFields.item(nNodeCount).UnitPrice.locale = "en_GB"; oFields.item(nNodeCount).TotalPrice.locale = "en_GB"; }
Maybe create a function with the locale as a property, so you can reuse in your switch.
Also, there is
form1.Table1.Footera.Subtotal.locale = "en_GB";
I don't see Footera anywhere on the form.
Hi Moris, your suggested code did the trick. Thank you.
Regarding:
form1.Table1.Footera.Subtotal.locale = "en_GB";
that code should not be there. Mistakenly left as I simplified this "sample form" from an existing "main form". Please discard that.
Awesome! Would be great to pin Moris's answer as correct.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies