0

new to process builder, trying to move from a formula field (which assigns a risk level, based on the values in three other fields) to a picklist, populated by process builder. (This is so I can then use consistent colours in Dashboard). I've tried to copy the logic of the formula field, and update it to process builder-style fields, but getting the syntax error...

The formula expression is invalid: Syntax error. Missing '='

this is my formula:

IF( ISPICKVAL( [In_Form__Risk_Assessment__c].Risk_present_MH__c  , "No" ) , "No risk" ,

IF( CASE( [In_Form__Risk_Assessment__c].Likelihood_mental_health__c  , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) < 8, "Low",

IF( CASE( [In_Form__Risk_Assessment__c].Likelihood_mental_health__c  , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) = 8, "Medium",

IF( CASE( [In_Form__Risk_Assessment__c].Likelihood_mental_health__c  , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) = 9, "Medium",

IF( CASE( [In_Form__Risk_Assessment__c].Likelihood_mental_health__c  , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) = 10, "Medium",

IF( CASE( [In_Form__Risk_Assessment__c].Likelihood_mental_health__c  , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) = 12, "Medium",

IF( CASE([In_Form__Risk_Assessment__c].Likelihood_mental_health__c   , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) > 12, "High", "" )))))))
1
  • Just a general suggestion - before save flows are well suited to this type of work, and are much faster than process builder. To resolve the syntax issues, I suggest you start with a single scenario, and the add to it. – gorav Feb 7 at 23:13
1

From line 3 to 6 where you are checking if the values are equal to a number, there should be two equals instead of one.

Try this

IF( ISPICKVAL( [In_Form__Risk_Assessment__c].Risk_present_MH__c  , "No" ) , "No risk" ,

IF( CASE( [In_Form__Risk_Assessment__c].Likelihood_mental_health__c  , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) < 8, "Low",

IF( CASE( [In_Form__Risk_Assessment__c].Likelihood_mental_health__c  , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) == 8, "Medium",

IF( CASE( [In_Form__Risk_Assessment__c].Likelihood_mental_health__c  , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) == 9, "Medium",

IF( CASE( [In_Form__Risk_Assessment__c].Likelihood_mental_health__c  , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) == 10, "Medium",

IF( CASE( [In_Form__Risk_Assessment__c].Likelihood_mental_health__c  , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) == 12, "Medium",

IF( CASE([In_Form__Risk_Assessment__c].Likelihood_mental_health__c   , "Very likely (5)", 5, "Likely (4)", 4, "Possible (3)", 3, "Slight (2)", 2, "Very unlikely (1)", 1, 0) * CASE( [In_Form__Risk_Assessment__c].Severity_of_impact_mental_health__c  , "Critical (5)", 5, "Major (4)", 4, "Significant (3)", 3, "Minor (2)", 2, "Insignificant (1)", 1, 0) > 12, "High", "" )))))))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.