Email template

I have an email template as shown below, the user has a number of pictures against the area. I want the pictures to show 3 across but cant seem to work our how to do this or if indeed it is possible?

 

bradley_davis1_1-1648218897940.png

 what i would like is

bradley_davis1_2-1648220043554.png

thanks

 

 

Solved Solved
0 26 830
1 ACCEPTED SOLUTION

With this arrangement the last picture will always show in the last column.

If you have 6 pictures, they will show 2 in each column but if you have 7 pictures the arrangement will be 1 st column -2, second column 2 and third column -3 

Basically the approach divides the list of number of pictures , that is [Photos] list into 3  smaller lists-one for each column through those VCs and expressions. So anything not in multiples of 3 will always appear in the last column.

View solution in original post

26 REPLIES 26

Getting the pictures into the format you have illustrated would be difficult.

What if you followed the first approach but placed the other details  in same row as the picture?  Such as :

<<Start: [Photos]>> <<Picture>><<[Date/Time]>><<[Comments]>><<End>>

Unfortunately the date/time & comments take up to much space even i reduce the column sizes it still means I have a load of wasted space.

I understand.  What if you divided the page into 2 columns each column having the Image, Date/Time, Comment?

 

[Picture][Date/Time][Comment]
[Picture][Date/Time][Comment]
[Picture][Date/Time][Comment]
[Picture][Date/Time][Comment]
[Picture][Date/Time][Comment]
[Picture][Date/Time][Comment]
[Picture][Date/Time][Comment]
[Picture][Date/Time] [Comment]

You would have a START/END for each column which means you would need to create the expressions for each column to divide the list of pictures.

 

Unfortunately, the templates operate on a row-based processing scheme.  To get the original template format you suggested, I think is  a LOT of work to try to make happen to accomodate an unknown number of pictures.

Hi, Thanks for your help on this, unfortunately I think I only have one option and that is the format below for now. It juts means the user can create 3 picture per record, not ideal but the only way I can do it so that they show in a row and there is no limitations.

bradley_davis1_0-1648480479494.png

 

BTW, this should be easily handled by display: flex on an html template.

Would you mind to try it?

Yes i would be very interested to try

Download this file:

https://gitlab.com/SkrOYC/html-public-templates/-/raw/main/Templates/Flex%20with%203%20columns%20for...

Then upload it to your drive and select it from the  "Attachment template" section on the task of your bot.

If there are any warnings, please post an screenshoot

Ok, I was completely ignored with this 😂

I saw your suggestion and even downloaded the html/CSS to take a look. I don't have a specific example app to try it on at the moment, but the approach looks sound to me.

I actually have one. I'm gonna try my template and come up with the result

Another option is to create three  lists of [Photos] , one each for 3  columns in the parent table. The sequence of photos in the report will be column wise. 

  1. The expressions for 3 VCs of list of photos ( one for each column):
  • The expression for the 1st column of [Photos] list will be called say column [1stColumnPhotos], Expression for the column:

TOP([Photos], CEILING(COUNT([Photos])/3))

  • For second column list  [2ndColumnPhotos] the expression will be

TOP([Photos]-[1stcolumnPhotos],CEILING(COUNT([Photos]-[1stcolumnPhotos])/2))

  • For third column list, [3rdColumnPhotos] 

[Photos]-([1stColumnPhotos]+[2ndColumnPhotos])

If you do not want to create the VCs, you could push these expressions in the report template as well.

2.The report output will look like below ( tested on a similar setup as your requirement)

Report.png

 

3. Your template for "photos" part will be something like

 

<<Start:[1stColumnPhotos]>>

<<[Picture]>>

<<[Date/Time]>>

<<[Comment]>>

<<END>>

<<Start:[2ndColumnPhotos]>>

<<[Picture]>>

<<[Date/Time]>>

<<[Comment]>>

<<END>>

<<Start:[3rdColumnPhotos]>>

<<[Picture]>>

<<[Date/Time]>>

<<[Comment]>>

<<END>>

Hi, I am liking where this is going however I am getting an error on the first column [1stColumnPhotos]=TOP([photo], CEILING(COUNT([Photo])/3)) it is saying count function used incorrectly

Please below table

bradley_davis1_0-1648542590559.png

 

Thank you. Could you update, what is the type of column [Photo]

From the screenshots shared, you are using expressions at an incorrect place.

You need to use the expression for list type column you have mentioned [Photos] with the <<START...>> expression.

Since you have used [Photos] in the <<START...>> expression, the column has to be list type.

From your earlier details shared, I believe the [Photos] list type column is in a parent table. I have suggested to create columns in the parent table. Please refer the sentence below.

"Another option is to create three  lists of [Photos] , one each for 3  columns in the parent table"

Hi, ok so my template reads as below

bradley_davis1_0-1648542883179.png

and my table is as below.

 

bradley_davis1_1-1648542933438.png

So the expression in the template is now matching the table however the 3 VC's I created are bringing up an error and seems to be the [1stColumnPhotos] which is causing this with the count function

Please read my the previous post.

Presume the [Photos] column is in "Site Audit" table. You need to create the 3 VCs in that table.

 

Hi, 

I have created 3 VC's, had to add a reference to the table as below columns 2 & 3 are now showing but having issues with column 1 as its not showing the 1st photo.

 

[1stcolumnphotos] - list

Top(photos table[photo],CEILING(COUNT(photos table[Photo])/3))

 

[2ndcolumnphotos] - list

TOP(photos table[Photo]-[1stcolumnPhotos],CEILING(COUNT(photos table[Photo]-[1stcolumnPhotos])/2))

 

[3rdcolumnphotos] - list

photos table[Photo]-([1stColumnPhotos]+[2ndColumnPhotos])

 

bradley_davis1_0-1648545524576.png

 

 

May I know [Photos] column you originally shared in the <<START... >> expression is from which table?

You had not shared photos table[Photo] in the original post.

My Photos Table contains the column photo as below, (I changed the table name to make it easier) ignore key column changed to picture ID

bradley_davis1_0-1648545903304.png

 

May I know from where you are invoking the report , from the parent table of the photos table?

Where is the Are: Main Cupboard field in the report coming from?

How do you decide what records from the Photos table to include in the report? 

Typically reports have one record from the parent table and the multiple related records from the child table. The <<START...>> expression will depend on how your report is invoked-from the parent table with associated children records ?

I have a parent table called main data to create a report and the user can then generate as many photos against that report.

bradley_davis1_0-1648551008298.png

 

Correct. That is what I was all along requesting and suggesting.

Please create the 3 VCs in the parent Main Data table  using the [Photos] reverse reference column in that table in the VC expressions. Then your template should work.

Again please note what I mentioned in the first post itself

"Another option is to create three  lists of [Photos] , one each for 3  columns in the parent table"

Ok success using the below. 

bradley_davis1_1-1648557482616.png

Results

bradley_davis1_3-1648557662764.png

 

The issue I have found is that the 4th picture shows in the 3rd column where it should show in the first.

below is the order the pictures was taken in.

bradley_davis1_2-1648557555014.png

 

 

 

 

With this arrangement the last picture will always show in the last column.

If you have 6 pictures, they will show 2 in each column but if you have 7 pictures the arrangement will be 1 st column -2, second column 2 and third column -3 

Basically the approach divides the list of number of pictures , that is [Photos] list into 3  smaller lists-one for each column through those VCs and expressions. So anything not in multiples of 3 will always appear in the last column.

Thank you for all your efforts its really apprecaited, I can cope with the last image issue the main thing was getting them 3 columns wide. Saves on so much paper doing this way if someone does print them.

Many thanks

Bradley

You are welcome.  Good to know it works. I will also explore if we can get rid of that extra image appearing in third column instead of first column. 

Thank you I could not have done this without your help 🙂

Top Labels in this Space