Do Format rules apply to email templates?

Does a format rule affect email templates?

I don’t think so. It would be easy enough for you to test, I’d think.

1 Like

Ok. Well now i need help with the expression - I cant figure it out.

So what i am trying to accomplish is to change the color on a value if that value is bigger or smaller from the previous day.

image

So, in this example - since the next day - the value is lower, I want to change the color to green. If it is higher, change it to red.

The value “49” is just the branch/location number. That will never change… The values in the last (4th) column are the values i will be looking at to change the color by day.

So, taking my example, I want the value “46.14” to be colored green.

What kinda format rule you want to apply to the template? Can you give an example? May be a screenshot?

In generally you can do it like this…

7 Likes

Do i put that on the template - or in Format rules - or both?

I have this expression in format rules - but it doesnt work how I want it to.

I need the expression to look at three values/columns:

Date
Branch
DSO

If it is today - (TODAY())
If the Branch is the same as yesterday branch
If the DSO is bigger or smaller from yesterday

Then change a color…
IFS(
AND(
([_THISROW].[date] > (TODAY() - 1)),
([Branch] = [_THISROW].[Branch]),
([DSO] < [_THISROW].[DSO])
),
TRUE
)

Template only.

1 Like

From my personal experience, format rules in the app definition are not applied to workflow templates. You would need the format rule in the application for it to show correctly in the application and you would also need to incorporate @Aleksi solution in the email template to get it to incorporate correctly in your workflow.

So you would need both in your case.

3 Likes

Don’t need the IFS():

AND(
([_THISROW].[date] > (TODAY() - 1)),
([Branch] = [_THISROW].[Branch]),
([DSO] < [_THISROW].[DSO])
)

is equivalent.

2 Likes

I must be missing something. It still doesnt change colors. See the picture (attached). Beaumont DSO goes down - so the last entry should be green?

I am still not seeing any Format rule working using the above expression…

I am not seeing why it does not work.

Format rules don’t affect documents generated from templates.

Ok. But i was doing this to have in a template and in the app. It doesnt seem to work.