Expand my Community achievements bar.

Language in Calculated Fields

Avatar

Level 10
Morning All, can anyone tell me what language is used in the Calculation on a calculated field in a custom form? It might help me to get the syntax right. I have the below pseudocode and the more I try to write it in the Workfront code, the more confused I get :) IF(FieldA<0,"Ahead")), IF(FieldA>0 && FieldA<8,"Within 1 Week") IF(FieldA>7,"Over 1 week") Ciaran Campbell
Topics

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

2 Replies

Avatar

Level 10
WF text mode, calculated fields are it's own thing but the logic should be close with others. However, I've never applied GT, LT in a calculated field and I don't think it's available. I would most likely apply this in a report instead as a rule or as part of a view as gt and lt can be done there. Or if you are adventurous, try the IFIN syntax and layout 1,2,3,4,5,6,7 as your "in progress" status. Just a tip, bracket your variables for use in calculations eg {Field A}. Polly Co

Avatar

Level 4
Try this nested IF IF((FieldA<0),"Ahead", IF((FieldA<8),"Within 1 Week", "Over 1 week")) The Basic Format of an IF is below, so nesting a second IF in the False Statement creates a more traditional chained IF else: IF(Condition, TRUE Statement, FALSE Statement) You should only need to bracket your Field name if it contains non-alphanumeric characters. Or if you haven't yet saved the new fields used. -- Melinda Layten, Senior Consultant Work Management Improvement CapabilitySource Phone: (484) 505-6855 site: www.capabilitysource.com email: melinda.layten@capabilitysource.com Helpful? Buy me a coffee: https://www.patreon.com/mlayten - we simplify your work so you can run your business -