Docx merge field

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