Expand my Community achievements bar.

Don’t miss the Workfront AMA: System Smarts & Strategic Starts! Ask your questions about keeping Workfront running smoothly, planning enhancements, reporting, or adoption, and get practical insights from Adobe experts.
SOLVED

Help with Valueexpression with IF Statement

Avatar

Level 3

Hi All, 

 

I'm hoping someone can help with the following text mode that I'm just not able to get to work.  I'm creating a border for a shared column and only want this to show for the status of New Pending Approval.  My guess is that the quotes within the statement are the issue. 

 

valueexpression=IF({status}="NEW:A","<div style="padding:4px 6px 4px 6px; background-color: #ffffff; border-radius:4px 4px 4px 4px; border-left: 2px solid #0875e1; border-right: 2px solid #0875e1; border-bottom: 2px solid #0875e1; border-top: 2px solid #0875e1;font-size:10pt;">","")

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I don't think you can use CSS directly in valueexpressions. Mostly I suggest you stick with the calculations shown on the kba: https://experienceleague.adobe.com/en/docs/workfront/using/reporting/reports/calculated-custom-data/...

 

Can you put this formatting into a separate column and sharecol it into the front of your your valueexpression instead?

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

I don't think you can use CSS directly in valueexpressions. Mostly I suggest you stick with the calculations shown on the kba: https://experienceleague.adobe.com/en/docs/workfront/using/reporting/reports/calculated-custom-data/...

 

Can you put this formatting into a separate column and sharecol it into the front of your your valueexpression instead?

Avatar

Community Advisor

 

Hi @Alex_Di,

 

I suspect @skyehansen is correct, but also noticed that the current examples uses the " symbol both around and within the div definition, so suggest you also try this (" around, ' within) version;

 

valueexpression=IF({status}="NEW:A","<div style='padding:4px 6px 4px 6px; background-color: #ffffff; border-radius:4px 4px 4px 4px; border-left: 2px solid #0875e1; border-right: 2px solid #0875e1; border-bottom: 2px solid #0875e1; border-top: 2px solid #0875e1;font-size:10pt;'>","")

 

Regards,

Doug

@Doug_Den_Hoed__AtAppStore @skyehansen I had a feeling that was going to be the answer, but I was hoping I was wrong and just not able to find the correct format.  

 

Thank you both for taking a look and spending some time on this, it's much appreciated 

 

Alex