Create a Workflow Template using a "start" expression to look the same way as a "gallery" view


I’ve made some complex template, can you link a photo, a document, or anything that shows what the final result has to look?

I believe the best option is if I make a small sample app :slight_smile:

1 Like

The result could be something like this. This is generated from child records where you have only one image column.


Though you can add headers as well like the Gallery view has…


This is exactly what I need!!! Can you please reveal the magic behind it, man? God bless you! hahahah

It needs a nested table structure…


Finally you found a trick! which should have been a long running mystery to find this type of tricks. I never come up with using MOD expression.

This is super awesome.

Quick question.

[_rownumber] field and its value is always adhere to the original table rather than “slice”.

For instance, let me explain simple case.

The table “image” looks like this

row number | image
1 | xvdsfsafdas.jpg
2 | fdsagasfas.jpg
3 | fgafasdfas.jpg
4 | htgafsddfsa.jpg
5 | dsafafdsa.jpg
6 | fffdsafafdsa.jpg
7 | fdsagasfada.jpg]

then the [related Images] ref fields should looks like this.

1 | xvdsfsafdas.jpg
3 | fgafasdfas.jpg
7 | fdsagasfada.jpg]

rather than,

1 | xvdsfsafdas.jpg
2 | fgafasdfas.jpg
3 | fdsagasfada.jpg]

What I mean is sliced, related table"s rownumber is not recalculated based on the slice condition, but inherit the row number from the original table.

On your demo case, we have 4 column, but I assume in the extreme case, we may have 2 images on the first column in the table, but none of images for the rest of 3 columns, based on the number of [_rownumber] being returned the slice (slice, in this case, is related rows based on ref.)

If the slice will be able to regenerate the new row number based on the selected number of the row, your template should perfectly work, what do you think?


Im just thinking of the trick @Suvrutt_Gurjar introduced to me before will add fuel to your trick to generate the serial number (alternative to row number) to run your trick more efficiently, although this is just based on impression, not testing anything at all.

At the end, the expressions will get bit expensive and heavy, but Im on the feeling that we could achieve the goal to display the multiple columns on template out of the multiple rows.

I invite your thoughts as well!

Looking forward to see you all response tomorrow, now time goes to bed…


Very elegant. Thank you!

In this example I only wanted to show how you can generate the template using nested tables. Yes you are correct that it can happen that one column have all images. In this case you don’t need to have a virtual sequential number to avoid that. You would only need to know how many images to but in every column. Those groups you can read with a virtual column like…
and the result is for example like 3,3,2,2. Then you can use it for filtering directly in the template. The template could be like this.

As we can see, there are lot of ways how you can solve your challenges and that’s always interesting :slight_smile: And I’m sure there is more clever way to do the same, but this was the first idea how to solve it.


Hi Aleksi,
Thank for sharing innovative ideas as always.
Inspired by your trick, I worked around with my own idea, employing dynamic rownumbers based on the slice (actually not a slice, but related child table rows), and use such a dynamic rownumber to dynamically assign to the template table with multiple column (my case was max 3 column rather than 4 in light of the width of the template which is portrait / A4 setting) together with MOD expression.

It is now perfectly working fine as well, although I took a bit different approach from yours, but ended up with the exactly same result, which is most important.

1 Like

@tsuji_koichi and @aleksi,

Thank you for sharing some very innovative ideas. Very interesting solutions for "gallery " views in the reports.

1 Like

As you can see, there are many ways as always :grinning:

1 Like

Not totally related but,

I use this kind of gallery template since long, but i stopped using it cause of this:

I never truly found an efficient and resilient way to generate an “index of the not empty column image”

I have 70 image columns !

It’s mandatory for my client to have an excel output with image next to others without empty cell.

Since i used Excel,

I solved it by creating an extra sheet where AppSheet output in a vertical manner every /image path file

then i used a macro to suppress all empty row, this do the job.

But do you know a way to do it directly inside Appsheet or inside << Template Expression >>

Anyway a big thank for the nested index tip.

1 Like

Is it possible that what ever image column can be blank? No rule at all?

Some image are mandatory but some are optional.

So i would say 30% column will be blank every time.

Can those images be like…

1 Like

One option is to use IF: & EndIf formula. Template could be like…