11-21-2018 3:54 AM - edited 02-03-2024 11:13 PM
Hi;
I am customising a billing form template for one of our customers. In there I like to update a couple of fields in the master template with information coming from the form template. Can this be achieved through scripting or any other way?
I have tried following in the validate event (for a control) in the form template:
xfa.resolveNodes("Form.Portrait_OutboundLetter.#pageSet")
or xfa.resolveNode("Form.Portrait_OutboundLetter.#pageSet")
But nothing is returned.
Executing xfa.resolveNode("Form.Portrait_OutboundLetter")
returns an object, but there are no child nodes available.
Executing xfa.resolveNode("Form")
returns an object, and I can see Portrait_OutboundLetter as one of the child nodes.
I can't use binding either because the value that I want to be displayed in the master template is already bound on the form template.
Regards
Thomas
Hi,
it's possible. Take a look at this subform in the content layout:
Form.frmHiddenGlobalFields.txtFormTitle::ready:layout
// Set the form title as the combination of title and document ID, separated by colon
//First Page (always available)
if (HasValue(txtChangedDocument.rawValue) == 0)
then
xfa.resolveNode("#pageSet[0].mst1.FirstPage.frmHeader.txtTitle") = Concat(Form.frmHiddenStaticTexts.lblSalesOrder.rawValue, ": ", Form.frmHiddenGlobalFields.txtDocumentID.rawValue)
else
xfa.resolveNode("#pageSet[0].mst1.FirstPage.frmHeader.txtTitle") = Concat(Form.frmHiddenStaticTexts.lblChangeToSalesOrder.rawValue, "\u000d", Form.frmHiddenStaticTexts.lblSalesOrder.rawValue, ": ",Form.frmHiddenGlobalFields.txtDocumentID.rawValue)
endif
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nicolas;
Great I have spend too much time on this already, and your solution is working. It is important which event is used for this. Works perfect in the ready:layout event.
As a workaround I was setting the value from some script in the master page (but this wasn't ideal)
Thanks again
Thomas
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.