Hello
How to pass the Values of the local variables to the Docx????
a!localVariables( local!data:ri!DocData, local!name:rule!SKJ_GetCustomerByAcc(AccountNum:ri!Number), local!resonDes:ri!resDes, /*to collect the data*/ concat( /*Parent */ "<document>", /*Name*/ "<name>", local!name['recordType!{a0871cca-bd3d-4d03-b9ce-d1652bfa9dc0}SKJ Customer.fields.{b06eb39c-bf2f-4bb4-b283-cdbb894e406d}name'], "</name>", /*Reson Des*/ "<Reson>", local!resonDes, "</Reson>", "<date>", datetext(now(),"yyyy/MM/dd"), "</date>", /*for each*/ a!forEach( items: local!data, expression: "<rowvalues financial = " & "'" & fv!item.finantialTransactionSerialNumber & "'" & " branch= " & "'" & rule!SKJ_GetBranchByBranchId(id:fv!item.branch)['recordType!{0b5c3436-ebb5-486a-bbc4-c4f7df64021a}SKJ Branch.fields.{78797bf8-4d42-44f8-a881-e794e7dfa43d}branchNameEn'] & "'" & " amount= " & "'" & if(a!isNotNullOrEmpty(fv!item.amount),fv!item.amount,"-") & "'" & " date= " & "'" & datetext(fv!item.documentDate,"yyy/MM/dd") & "'" & " MainType= " & "'" & rule!SKJ_GetMainType(mtype: fv!item.mainType)['recordType!{ba0dd34e-52a6-4f09-ba3a-dd6885feda5b}SKJ Main Type.fields.{e5eb76e0-4885-44d7-b9c3-263533a5f721}descEn'] & "'" & "/>" ), "</document>", ), )
Discussion posts and replies are publicly visible
Nevemind i fixed it.
but how do i pass these variables , that are not defined inside the Foreach:
They are not supposed to be in the Tabel:
"<name>", local!name['recordType!{a0871cca-bd3d-4d03-b9ce-d1652bfa9dc0}SKJ Customer.fields.{b06eb39c-bf2f-4bb4-b283-cdbb894e406d}name'], "</name>",
/*Reson Des*/
"<Reson>", local!resonDes, "</Reson>",
"<date>", datetext(now(),"yyyy/MM/dd"), "</date>",
What should i write in the Docx , for the Customer's name for example, cause when i simply add merge field «${d.@namee}»
It returns an error in the template
Hope someone helps