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.
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!
User | Count |
---|---|
40 | |
34 | |
29 | |
23 | |
17 |