Color format in PDF

Hi there!
Is there a way to format the color of a value in the PDF workflow of that value is equal to…“x”?

Solved Solved
0 15 1,103
1 ACCEPTED SOLUTION

Hi @Peter and @SABIO_Soporte,

Please explore, if below helps. I am giving below the approach that was originally given by @Aleksi in response to a post last year. I am just giving it below with an example and associated screenshots.

Please have an expression like below in the workflow template. The entire conditional part needs to be in a color that you wish to appear in the report based on the condition.

Workflow Template Image:
2X_7_784f7454e3b69a09ef0e23abaec49faae31539c8.png

PDF Result 1 Image: When One condition is satisfied
2X_f_f90bebdf050bad6f99bdbbcf7275b53ea5268ed5.png

PDF Result 2 Image: When One condition is satisfied
2X_0_00b6fc7c28bf85babce316f32272fa62d9f89011.png

Hope this helps.

View solution in original post

15 REPLIES 15

Hey @SABIO_Soporte! I’m not sure if there is a way, but what exactly are you trying to control the color of?

Eg: If a value in a [column]=0, then add a value in the PDF in red colour.

Hi @Peter and @SABIO_Soporte,

Please explore, if below helps. I am giving below the approach that was originally given by @Aleksi in response to a post last year. I am just giving it below with an example and associated screenshots.

Please have an expression like below in the workflow template. The entire conditional part needs to be in a color that you wish to appear in the report based on the condition.

Workflow Template Image:
2X_7_784f7454e3b69a09ef0e23abaec49faae31539c8.png

PDF Result 1 Image: When One condition is satisfied
2X_f_f90bebdf050bad6f99bdbbcf7275b53ea5268ed5.png

PDF Result 2 Image: When One condition is satisfied
2X_0_00b6fc7c28bf85babce316f32272fa62d9f89011.png

Hope this helps.

Thanks @Suvrutt_Gurjar!

@Suvrutt_Gurjar , could you please kindly advise, how would one incorporate the above into a Start Expression. 

I have a column which is the End column "<<[EQL_Frequency_of_Service]>><<End>>" and I need to colour code depending on the Answer. Where do I add the Ifs expression in relation to the <<End>> Expression?

 

@Quality_Assuran 

Could you share the entire START expression and elaborate a little more on your requirement,  meaning what column you wish colour coded (I presume it is [EQL_Frequency_of_Service]) , what is the type  of the column and what are its option values etc.?

Sure, thank you for the quick response.

<<Start: [Related Equipment_Lists]>><<[EQL_No]>> is the first column

<<[EQL_Name]>> is the second column

<<[EQL_Frequency_of_Service]>><<End>> is the third column

The third column is a Ref column to a table with one column which is the key and the label column. [Frequency]

Below are the options. I would like to colour code each cell in the third column based on the frequency selected

Daily
Weekly
2 x a month
Monthly
4 x per Year
2 x per Year
Yearly

Is it possible to colour code the cell rather than the text?

If not just the text would need to change

Thank you.


@Quality_Assuran wrote:

Is it possible to colour code the cell rather than the text?


I believe that is not easily possible. Could be tried with Appscript possibly. But I believe the PDF engine of AppSheet will still drop those cell colours.

Just to colour the text, please try the approach shared earlier, something like below. This means, you will need to code each option separately with the desired colour.

<<IFS([EQL_Frequency_of_Service]="Daily", [EQL_Frequency_of_Service])>>

<<IFS([EQL_Frequency_of_Service]="Weekly", [EQL_Frequency_of_Service])>>

.

.

.

<<IFS([EQL_Frequency_of_Service]="Yearly", [EQL_Frequency_of_Service])>>

 

Where do I position these expressions, should all of your expressions be placed in the third column, prior to the <<End>>?

And do I do away with <<[EQL_Frequency_of_Service]>> on its own?

Yes, correct.

Hi @Quality_Assuran ,

May we know if the suggested approach worked for you or not. Any update will be useful for any future reader of the post thread, the way you could locate this old post thread since it had resolution information.

@Suvrutt_Gurjar thank you, I did not get a chance to test it until now, but it is working perfectly

Good to know it works the way you wish. Thank you very much for the update.

@whoever reads this in the future, this worked for me. See below for where to position them.

Hello , I am just working with a pdf. I need to get the real color instead of the word “Red”, or “Green”.

Is there a way to insert the real color, some function like <<TEX(value, format"Color")>> ?, so the color shows and not the word…

Best

Top Labels in this Space