Skip to main content
ankushs0002
Known Participant
June 3, 2024
Question

Need to add multiple fields dynamically throught XML. How i will add multiple grids using XML structure dynamically

  • June 3, 2024
  • 7 replies
  • 0 views

I have a story where I need to create a PDF document. Within this PDF, I need to incorporate multiple fields and grids. While the fields are functioning properly, I encountered an error when attempting to dynamically add grids. Interestingly, there are no errors apparent in the XML structure. However, during the process of converting the XML to PDF, an error arises.

Error: 

freemarker.core.NonStringOrTemplateOutputException: For "${...}" content: Expected a string or something automatically convertible to string (number, date or boolean), or "template output" , but this has evaluated to a sequence+hash (wrapper: f.e.dom.NodeListModel):
==> wo.@vendorName [in template "fr.opensagres.xdocreport.document.docx.DocxReport@322fce7b!word/document.xml" at line 4, column 28085]

----
Tip: This XML query result can't be used as string because for that it had to contain exactly 1 XML node, but it contains 0 nodes. That is, the constructing XML query has found no matches.
----

----
FTL stack trace ("~" means nesting-related):
- Failed at: ${wo.@vendorName} auto-escaped [in template "fr.opensagres.xdocreport.document.docx.DocxReport@322fce7b!word/document.xml" at line 4, column 28083]
----




Please anyone let me know any modification so i will apply those changes

7 replies

stefanhelzle0001
Brainy
June 3, 2024

I think the best way to create PDF is this: appian.rocks/.../

ankushs0002
Known Participant
June 3, 2024

Okay , But it is lengthy there is not other way to do it. I am doing this by this way using subtitute.

ankushs0002
Known Participant
June 3, 2024


I have an given template to dynamic this template i am creating expression rule !!!