Discussion posts and replies are publicly visible
Hello everybody
I have created an Expression Rule that allows to generate a Dynamic Dictionary of images that receives as input the Smart Node DOCX From Dynamic Template
XML Input Example:
"<ListImages><logo>5758</logo><imagen>5765</imagen><imagen>5774</imagen></ListImages>"
/* Recibe un XML con los IDs de las imagenes y crea el diccionario para enviarlo al Smart Node DOCX From Dynamic Template
(Receive an XML with the IDs of the images and create the dictionary to send it to the Smart Node DOCX From Dynamic Template)
Example: <ListImages><icon>5758</icono> <image>5765</imagen> <image>5774</imagen> </ListImages> *******/if (or(ri!xmlImages = "", isnull( ri!xmlImages )), null(), load( local!xmlImagenes: ri!xmlImages, /***** Obtiene el nombre de los nodos del XML(Gets the name of the XML nodes) *****/ local!nodosXML: union(apply(xpathsnippet(_,"local-name(/*)"), xpathsnippet(local!xmlImagenes,"/*/*")),{}),
/***** Expression *****/ dictutil_merge( a!forEach( items: local!nodosXML, expression: dictutil_newbykeyval(fv!item, todocument(xpathsnippet(local!xmlImagenes,"//*[local-name(.)='" & fv!item & "']/text()")
) ) ) ) ))
Process Variables
Input Images:
Regards, Gustavo
Hello , could you share the template please im try to generate like you post ,and i cant generate the doc i need insert only one image. regards