How to generate XML to add in the document template.

Hello,

I am using 'DOCX From Dynamic Template' smart service in my process model.

How to generate the column's values, we store in the document template we are using in this smart service.

For Example:

«${doc.pvadoc.abc}» is the value of a column in the used document template. How to generate this value for all the columns of the document?

  Discussion posts and replies are publicly visible

Parents Reply
  • Hi 
    We need to construct this xml structure using exp rules.

    Rule-1: Input will be tableData(Your CDT type which is an array)
    substitute(
      stripwith(
        "<DocFromDynTemp>" & fn!apply(
          rule!Rule-2(
            tableData: _
          ),
          ri!tableData
        ) & "</DocFromDynTemp>",
        ";"
      ),
      "&",
      "&amp;"
    )

    Rule-2 : Input will be tableData(Your CDT type)  -- This rule is used to prepare the xml data for each fields in a row.

    "<rowvalues column1= " & "'" & index(
      ri!tableData,
      "fieldName1",
      null
    ) & "'" & " column2= " & "'" & index(
      ri!tableData,
      "fieldName2",
      null
    ) & "'" & " />"

Children
No Data