Help with Valueexpression with IF Statement | Community
Skip to main content
Alex_Di
Level 3
September 9, 2024
Solved

Help with Valueexpression with IF Statement

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;">","")

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
skyehansen
skyehansenAccepted solution
Level 4
September 9, 2024

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/calculated-data-expressions

 

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

3 replies

skyehansen
skyehansenAccepted solution
Level 4
September 9, 2024

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/calculated-data-expressions

 

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

Translate
Doug_Den_Hoed__AtAppStore
New Participant
September 9, 2024

 

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

Translate
Alex_Di
Alex_DiAuthor
Level 3
September 9, 2024

@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

Translate