Variables in Attachment Template

Dion
New Member

Hi everyone,

I have a question here. Is there any way to make the position of the variable (for instance, <<[Name]>>) flexible depending on the length of its value? I was trying to design a certificate, and plan to send it using email via Bot. Hence, I have to put variables inside as shown below:
3X_0_8_08790a84552192dba74ccb816113aa3854f269df.png

I would like to keep the value of <<[Name]>> in the middle, regardless of its length. The result is ok when the name is short, but when it has a long length, like “Name for Testing Purpose Only”, it ends up like this:

I want it to always remain in the middle like this:
3X_2_6_26b2641f496a5ab45da6702fbb60167bf7539eaa.png

Anyone reading this post has any idea? Thanks.

Solved Solved
0 11 258
1 ACCEPTED SOLUTION

Okay, in that case , one reason could be, the minimum margin is introduced by the AppSheet’s template to PDF conversion engine.

Other community colleagues may have better insights or you may wish to contact AppSheet support team.

View solution in original post

11 REPLIES 11

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Dion

Did you try to set “centered” to your <<[Name]>> part on your template ? (or “middle”, I don’t know the English word for it)

For some reasons, I try to avoid changing the alignment. But maybe I can give it a shot.

@Aurelien bad news… it didn’t work

Is it possible to know how your template looks? Have you placed the template variables simply on the template page?

If you have simply placed the template variablea on the template page , please place them inside the table as below. Make the template variables with centered alignment inside the table. The table also needs to be centered on the page.

After ensuring the alignment, make the table border itself white color or color of the certificate background. This is shown below by highlighting the table.

Then the emailed certificate PDF will look like below

With the table border black color retained just to demonstrate the center alignment

The below certificate PDF has table borders made to white

Edit: Changed images to reflect correct date expression

@Suvrutt_Gurjar Your suggestion does make the text in my certificate become neat. Thanks a lot. But another problem came out. Do you know how to remove this margin? The picture shown below is the certificate sent by Bot. The reason why I didn’t remove the borderline is to see clearer

If you are using Google doc, please make left, right ( and top, bottom as necessary) margins 0

Option under File – > Page Setup

Same procedure for the Word template

You may still have some space when you place pictures etc inside the tables. To get rid of any spacing within the tables, please make the highlighted settings below.
Option Format – > Table – > Table Properties

@Suvrutt_Gurjar Thank you. I will try out your suggestion and get back to you later.

Dion
New Member

@Suvrutt_Gurjar I’d done everything you said, I set all the margin to 0, put the text inside table. Now the certificate looks pretty decent, but there’s still margin like what I showed before.

Okay, in that case , one reason could be, the minimum margin is introduced by the AppSheet’s template to PDF conversion engine.

Other community colleagues may have better insights or you may wish to contact AppSheet support team.

I see. Alright. Thank you very much for your help!!

Top Labels in this Space