Sending multiple images over a dynamic DOCX template smart service

Hi All,

I have a requirement where i need to pass two different images over different location in docx dynamic template.

«[#list logo as logo]» image«[/#list]»   location 1 .

«[#list lang as lang]» image«[/#list]»  location 2.

As there are two images to be added , i am passing ={logo:pv!photo,lang:pv!photo} to the Image input parameter of the smart service. But only the logo paired image is getting displayed and the other one doesn't show up.

So can anyone help me in the syntax or the annotations needed to get these images rendered?

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to girishk5785

    Hello Acacio,

    Below is the error that comes when running the process model, but not sure where is the problem

    Parsing error in template "fr.opensagres.xdocreport.document.docx.DocxReport@74cbdc4f!word/document.xml" in line 4, column 8155:Unexpected directive, "[/#if]". Check whether you have a valid #if-#elseif-#else structure.

    Below is the configuration

       

    Thanks & Regards

    Girish Katti

Children
  • Hey Girish, I can tell you couple things for you to check. The error that you attached is not related to the images, but to an IF condition that was not properly implemented, as I could not find any IF in your previous uploaded template I'm assuming that one was just an snapshot of your real template, so please check all IF conditions that you have and check if they are correct implemented.

    Other thing that could help you is that you could use the function toXml() in order to generate your XML files, that way you avoid text manipulation and is way easier to generate a proper XML, this is just a tip you dont actually need to follow that.

    Check the IF's in the template and let us know.

    Acacio B.

  • 0
    Certified Senior Developer
    in reply to Acacio Barrado

    Hello Acacio,

    Thankyou very for the reply.

    In the DOCX Dynamic Template Smart Service, I'm calling the template shared directly in the process. In the template other than the 4 images defined there is no "if" clause mentioned and not other fields referenced.

    Also for xml generation added the toXml() function in the expression rule.

    Attached document for reference.

    6087.DummyTemplate.docx

    Thanks & Regards

    Girish Katti