How to do conditional formatting in Report? ...

How to do conditional formatting in Report?

I have a field called โ€œStatusโ€ and possible values are โ€œDONEโ€ and โ€œNOT DONEโ€. I have done format rules in such a way that โ€œDONEโ€ will be green and โ€œNOT DONEโ€ will be red.

When i have them on a report, it prints in black color.

How do i achieve this?

Thanks.

1 14 1,883
14 REPLIES 14

I think in reports formatting is controlled by the template (i.e. Google Doc), therefore you cannot dynamically change formats based on the columnโ€™s value from AppSheet.

Actuallyโ€ฆ you can:D

@Aleksi_Alkio How? Please

<<IFS([STATUS]=โ€œDONEโ€,[STATUS])>><<IFS([STATUS]=โ€œNOT DONEโ€,[STATUS])>> Then choose different color for both formulas. When the other one is blank, you just donโ€™t see it

The syntax is different to appsheet in-app syntax, ie, you have used IFS, instead of IF. Do you know if there is a reason for that, @Aleksi ?

@Andrew_Eills
Thatโ€™s a formatting for report template. <<[ColumnA]>> is a placeholder for the report template to record the value of the [ColumnA] in the report. As the user wants to conditionally format the text as per [STATUS] column, you need to use 2 IFS statements so that if the conditional statement is FALSE, the placeholder appears as blank in the template. With IF statement, you can provide the same functionality but the expression will be longer and instead of a blank placeholder it will probably leave a blank space.

<<IF([STATUS]=โ€œDONEโ€,[STATUS],"")>><<IF([STATUS]=โ€œNOT DONEโ€,[STATUS],"")>>

Thanks for explaining.

Youโ€™re welcome

Hi Alexi.
Thanks for explaining, I used this answer in my APP. But I still cannot get color in my PDF report (from a Google doc template). I got the formula to work, but still black. I made Format Rules for color in UX, but colors are only showing in APP (not in report).
What did you mean by: โ€œThen choose different color for both formulas.โ€?
I think I might have misunderstood that partโ€ฆ?

PS: I use this to risk evaluation. Like Risk before (RED/Yellow/Green) and Risk after (RED/Yellow/Green).

Br.

You nailed it! Thank you

@Aleksi_Alkio Greatโ€ฆShort and Simple Logicโ€ฆ Thanks lot

Youโ€™re welcome

See topic โ€œIf Expressions Can Conditionally Format a Fieldโ€ in this article https://help.appsheet.com/en/articles/2697069-template-if-expressions

Thanks a lot. Got it!

Top Labels in this Space