0

I am creating a formula variable in a Flow but keep getting this error. Crop net Acres is a Number field.

IF(
    ISBLANK( [Opportunity].Crop_Net_Acres__c),
    0, 
    ( [Opportunity].Crop_Net_Acres__c)
)

Error Message:

netAcresFormula (Formula) - The formula expression is invalid: Syntax error. Missing '='

Any thoughts here?

2
  • I don't have an answer for the error, but keep in mind you can also use the BLANKVALUE function, it's a little simpler for this use case. Jun 23, 2021 at 16:43
  • The format for the formula you posted worked for me in a test formula field on an object. But I've never used a Flow formula variable, so I don't what, if anything, might be different there to cause an issue.
    – Moonpie
    Jun 23, 2021 at 17:29

1 Answer 1

3

You are using the wrong syntax for Flow formulas (you were using the Process Builder syntax)

Assuming this is a record-triggered flow on Opportunity, then $Record contains the flow interview's Opportunity.

IF(
  ISBLANK( {!$Record.Crop_Net_Acres__c}),
  0, 
  {!$Record.Crop_Net_Acres__c}
)

as @DavidCheng suggests you can do this more concisely

BLANKVALUE(!$Record.Crop_Net_Acres__c},0)

When using the formula builder, be sure to click Insert a Resource which allows you to select from all available resources known to the Flow - the proper syntax then gets pasted in.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .