How to display a list of images into 2 columns or 3 columns when creating pdf by automation

Hi everyone, 

I have a list of images, and want to show it in columns (2, 3 or more.. which is displayed as same as gallery view ), been trying out but can not achieve it, only can show it row by row by <<start:>> and <<end>> expressions.

For example, I have list of {image 1, image 2, image 3, image 4}, I want to show as below when creating pdf by automation. If anyone has experience with this kind of display, please kindly advise. Thank you.

kvngo94_0-1710145240514.png

 

 

Solved Solved
0 9 145
1 ACCEPTED SOLUTION

9 REPLIES 9

Please post such queries in "Q&A" section.

Could you update if those images are from the same record or multiple records of a table?

or are those images (one per record ) from a child table?

Also if possible, could you share your existing template expression?

Hi Suvrutt, 

Sorry I didn't notice the Q&A box...

Those images are multiple records of a table ( each row has 1 image ).

The example data would be as below for Table named "Bag" :

IDImageBag Name
1Image 1Name 1
2Image 2Name 2
3Image 3Name 3

My template expression : 

Image
<<START: Bag[ID]>>
<<[Image]>>
<<[Bag Name]>><<END>>

Result (not as expected)

Image
Image 1
Name 1
Image 2
Name 2
Image 3
Name 3

What I'm trying to achieve is : 

Image 1
Name 1
Image 2
Name 2
Image 3
Name 3

Thank you. Please try something like below. Not very elegant but will work.

The below will work for up to six images. You may want to suitably adjust /add columns /rows, expressions.

<<START: LIST(INDEX(Bag[ID],1))>>
<<[Image]>>
<<[Bag Name]>><<END>>
<<START: LIST(INDEX(Bag[ID],2))>>
<<[Image]>>
<<[Bag Name]>><<END>>
<<START: LIST(INDEX(Bag[ID],3))>>
<<[Image]>>
<<[Bag Name]>><<END>>
<<START: LIST(INDEX(Bag[ID],4))>>
<<[Image]>>
<<[Bag Name]>><<END>>
<<START: LIST(INDEX(Bag[ID],5))>>
<<[Image]>>
<<[Bag Name]>><<END>>
<<START: LIST(INDEX(Bag[ID],6))>>
<<[Image]>>
<<[Bag Name]>><<END>>

Hi Suvrutt, 

What if I have like n images, not just 6 ? 

Then I believe you should use Aleksi's nice solution as it already caters to n number of images.

Hi Suvrutt, noted and thank you for your help

One workaround is to use this method we discussed few years ago ๐Ÿ™‚

https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/Create-a-Workflow-Template-using-a-quot-start-q...

Thanks Aleksi, I'm also asking another Aleksi for more details hhh, guess it's you ^^

Probably ๐Ÿ™‚

Top Labels in this Space