Hi guys! This thread is inactive, but I have a build on this question.
In a Document report I'm building, I use the following code for one of my columns:
displayname=Decision: Changes Required
listmethod=nested(currentVersion.proofApprovals).lists
listdelimiter=<div>
type=iterate
valueexpression=IF({approverDecision}="Changes Required",CONCAT("🔴 ",{approver}.{name}),"")
valueformat=HTML
This works perfectly! However, for some reason, Workfront will occasionally have the {approverDecision} variable in lowercase. Anyone who (unintentionally) marked "changes required" does not get pulled by this formula.
Richard Le suggested adding "_Mod=cieq" to a variable in the original question linked above, but not sure how to apply that here.
Thanks in advance for your help!
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
hi -- firstly, valueexpressions are not API calls and do not use the same syntax as API calls. An overly simplistic way to look at it is that API calls look similar to the text mode in your report's filter section and not at all like what you're doing in the report's view/grouping section.
But you can also look at it as:
* API calls: what you're doing to GET your report rows
* valueexpressions: what you're doing TO your report rows
i.e. they're essentially two different languages.
Secondly, valueexpressions are similar to calculated expressions -- in that mostly the syntax and intention (what you're trying to do with either) is identical (any differences are called out in the page I linked to below). You would therefore manage them using the functions that are listed on this page:
If you are having issues with different cases within an "expression", the solution for this isn't to account for all the cases, or somehow tell the system "case doesn't matter". That trick works in your filters area, but it doesn't work here.
The solution (for views) is to make sure that case doesn't matter. You can do this by including the UPPER or LOWER function (in the link I included above).
i.e. instead of searching on "changes required" or "Changes Required" (a very "filter" thing to do), you use a function to change any answer to either all upper or all lower case, and then you run the rest of your expression.
For example, if this expression worked for you,
valueexpression=IF({approverDecision}="Changes Required",CONCAT("🔴 ",{approver}.{name}),"")
I would guess you could alternatively run something like this:
valueexpression=IF(LOWER({approverDecision})="changes required",CONCAT("🔴 ",{approver}.{name}),"")
One small add: I tried adding OR like so, but it didn't work.
valueexpression=IF(OR({approverDecision}="Changes Required",{approverDecision}="changes required"),CONCAT("🔴 ",{approver}.{name}),"")
Views
Replies
Total Likes
hi -- firstly, valueexpressions are not API calls and do not use the same syntax as API calls. An overly simplistic way to look at it is that API calls look similar to the text mode in your report's filter section and not at all like what you're doing in the report's view/grouping section.
But you can also look at it as:
* API calls: what you're doing to GET your report rows
* valueexpressions: what you're doing TO your report rows
i.e. they're essentially two different languages.
Secondly, valueexpressions are similar to calculated expressions -- in that mostly the syntax and intention (what you're trying to do with either) is identical (any differences are called out in the page I linked to below). You would therefore manage them using the functions that are listed on this page:
If you are having issues with different cases within an "expression", the solution for this isn't to account for all the cases, or somehow tell the system "case doesn't matter". That trick works in your filters area, but it doesn't work here.
The solution (for views) is to make sure that case doesn't matter. You can do this by including the UPPER or LOWER function (in the link I included above).
i.e. instead of searching on "changes required" or "Changes Required" (a very "filter" thing to do), you use a function to change any answer to either all upper or all lower case, and then you run the rest of your expression.
For example, if this expression worked for you,
valueexpression=IF({approverDecision}="Changes Required",CONCAT("🔴 ",{approver}.{name}),"")
I would guess you could alternatively run something like this:
valueexpression=IF(LOWER({approverDecision})="changes required",CONCAT("🔴 ",{approver}.{name}),"")
OMG. Thank you, Skye! I so sincerely appreciate your in depth answer here! 😁
Confirming, the formula at the bottom of your answer IS the correct fix:
valueexpression=IF(LOWER({approverDecision})="changes required",CONCAT("🔴 ",{approver}.{name}),"")
Every time I think I've learned a lot about Workfront text mode, I get humbled into the ground. Back to reading & tinkering!
Views
Replies
Total Likes
Views
Likes
Replies