I created a table in an email using HTML code (because it worked better than creating the table with Create HTML Table). Here is the part of the HTML:
that produces this result below the column headers:
Entry | Previous | UPDATE |
Quantity | 1 | 2 |
I need to change the background color of the Quantity UPDATE cell when the quantity changes from previous.
When I create the following formula in a compose and place its output right before output for the update column, it just puts the word yellow before the 2.
For anyone that's interested, I was able to figure this out.
Based on the original example, I created a compose action with if expression:
In the body of the email, I inserted the outputs from above right before <p class=MsoNormal following the <td for the relevant cell:
Notice (highlighted in yellow) that the space between <p and class needs to be removed and another </p> needs to be added (its initial<p is in the compose action).
The result is:
I think I have the formula with the condition, but am having trouble placing it in the html.
I made a simpler expression just to get the cell to turn yellow:
style=\"background-color:yellow;
and put it in the html as below:
This is the result:
If placed right before dynamic content, I get this:
And when I placed the style color expression between <td and width=252, I get this:
Does anyone know where to put the expression so it will look like this?
hi @SMiller3 here is an example about using if as expression
If (true/false,if true,if false)
As you can see you need to provide first a true or false value. How can you get that? maybe using another expression like empty(). For example: If Column is empty then true, if no then false.
If(empty(Column),'ShowBlackColor', ShowYellow)
As you are working on HTML I'll replace the css code with my expression.
so you can try if(true/false,'style='color:black'',style='color:yellow')
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional