2

Looking for help regarding syntax error "The formula expression is invalid: Field Opportunity is a picklist field. Picklist fields are only supported in certain functions."

Trailhead documentation says ISPICKVAL can be used in field updates and workflow rules, which is why I am trying to use it in a process builder workflow. https://trailhead.salesforce.com/modules/advanced_formulas/units/picklist_formulas

I want the process builder to update a text field value when a text field is either blank OR unchanged AND when an opportunity picklist field = a certain value AND when the opportunity picklist field has been changed.

([Opportunity].StageName) is a picklist field.

([Opportunity].NextStep) is a text field.

Process Builder Criteria Node starts when formula equals true and the checkbox in the "Advanced" area is NOT checked (tried this where it was checked and unchecked).

I've tried four variations of this formula in Process Builder, but no go. NOTE that I've also tried to create a Checkbox Formula field with a version of the formula and get the same type of error, so I'm sure I'm just not getting something right somewhere.

Formula Variation 1:

OR(
    AND(
        ISPICKVAL([Opportunity].StageName = "Prospecting"),
        ISBLANK([Opportunity].NextStep)
        ),
    AND
        (ISPICKVAL([Opportunity].StageName = "Prospecting"),
        ISCHANGED(ISPICKVAL([Opportunity].StageName)),
        NOT(ISBLANK([Opportunity].NextStep)),
        NOT(ISCHANGED([Opportunity].NextStep))
        )
)

Formula Variation 2 -- see the line with font that is BOLDED with ITALICS ):

OR(
    AND(
        ISPICKVAL([Opportunity].StageName = "Prospecting"),
        ISBLANK([Opportunity].NextStep)
        ),
    AND
        (ISPICKVAL([Opportunity].StageName = "Prospecting"),
        ***ISPICKVAL(ISCHANGED***([Opportunity].StageName)),
        NOT(ISBLANK([Opportunity].NextStep)),
        NOT(ISCHANGED([Opportunity].NextStep))
        )
)

Formula Variation 3 -- -- see the lines using TEXT:

OR(
    AND(
        ***TEXT***([Opportunity].StageName = "Prospecting"),
        ISBLANK([Opportunity].NextStep)
        ),
    AND
        (TEXT([Opportunity].StageName = "Prospecting"),
        ISCHANGED(TEXT([Opportunity].StageName)),
        NOT(ISBLANK([Opportunity].NextStep)),
        NOT(ISCHANGED([Opportunity].NextStep))
        )
)

Formula Variation 4 -- see the line with font that is BOLDED with ITALICS )):

OR(
    AND(
        TEXT([Opportunity].StageName = "Prospecting"),
        ISBLANK([Opportunity].NextStep)
        ),
    AND
        (TEXT([Opportunity].StageName = "Prospecting"),
        ***TEXT(ISCHANGED***([Opportunity].StageName)),
        NOT(ISBLANK([Opportunity].NextStep)),
        NOT(ISCHANGED([Opportunity].NextStep))
        )
)

I've also tried it where the "=" is changed out with ",". And, by removing the "" around Prospecting.

5

Your first formula was probably the closest. Here's the revised version.

The IsPickVal function requires two parameters, separated by a comma. The IsChanged function requires one parameter, the field to check for changes.

OR(
  AND( ISPICKVAL([Opportunity].StageName, "Prospecting"),
       ISBLANK([Opportunity].NextStep) ),
  AND (ISPICKVAL([Opportunity].StageName, "Prospecting"),
   ISCHANGED([Opportunity].StageName),
  NOT(ISBLANK([Opportunity].NextStep)),
  NOT(ISCHANGED([Opportunity].NextStep)) ) )

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.