Skip to main content
March 28, 2022
Question

Images in a grid [DOCX From Dynamic Template Smart Service]

  • March 28, 2022
  • 6 replies
  • 0 views

Hi,

We have a project requirement where we need to pass an array of images into a grid, each row with a different image.

The grid is already configured, but we can't seem to manage to pass dynamically an array of images into the grid - they are appear repeated across all rows and for each row, we want the image that corresponds to that row position. For row 1, we want image 1, for row 2, image 2...

Current output

Expected output

Currently, we are defining the barcode image column like this:

And the node is configured currently as:

My suspicion is that Appian can't iterate automatically throughout the array and position each image in each row but I'm not really sure how this can be achieved.

Kind regards

6 replies

gopalk2865
Participating Frequently
March 29, 2022

Hi Marta, Is it possible to bind images with each row data. that way you can pass 1 image per row.

March 29, 2022

Hi Gopalk,

We didn't manage to come up with a solution yet for the images. Do you have any idea how we can achieve it?

April 18, 2022

[mention:663f61f687054c48a8709b34ca84fcaf:e9ed411860ed4f2ba0265705b8793d05][mention:b389a349840947d58879708f8b0249f2:e9ed411860ed4f2ba0265705b8793d05]

I know you've already worked a lot with these types of requirements. Do you mind me asking how can I achieve an output like this? We still couldn't manage to find a solution.

acaciob0002
April 19, 2022

Hi martab0003,

It is a tricky requirement that you have. Specially because the list and the images array are not directly linked. I was wondering if you could try to apply an index for the requested image, but that means that you would need to make sure that the list size and the image array have the same size and posibily it would require you to have dynamic bookmarks and Im not sure if that is possible.

Personally for these complex requirements I prefer to directly generate the document in PDF using XSL-FO. But even if you choose this approach, you would need to have the barcodes stored in Appian as base64, but at least you would have totally control on the document generation.

I'll try run some tests here using FreeMaker, lest see If I can find something.

Regards,

Acacio B.

April 19, 2022

Thank you so much for the feedback, [mention:b389a349840947d58879708f8b0249f2:e9ed411860ed4f2ba0265705b8793d05]!

It is indeed a tricky requirement.

We still couldn't come up with a solution for this... We also tried to create a CDT to map the images but the node doesn't seem to understand how to iterate throughout the list of images and place them in the correct position.

My guess is that whenever the node runs and receives a list of images, it can't properly correlate how the information for the grid is related to the images and receive an index for each image.

Let us know please if you think about any solution, we're still wondering how we are going to achieve the solution.

Kind regards