0

I'm adding a formula variable in flows where I need to update a record if Field A is changed and also should not be null. This is a before save flow and runs only on update records. I tried below formula but does not seem to work.

ISCHANGED({!$Record.FieldA}) && NOT(ISBLANK({!$Record.FieldA})) 

What should be changed? I need to check same condition for many fields and hence I am creating a formula field instead of directly updating the conditions.

3
  • What is the data type of this Field A?
    – prem22
    Commented Feb 26 at 14:08
  • @prem22 Text field
    – coder123
    Commented Feb 26 at 14:09
  • do you have any other flows that run on this object when you update? Your formula seems to be fine. I tested the formula.
    – prem22
    Commented Feb 26 at 17:29

1 Answer 1

0

As per @prem22's comment, I was able to reproduce the flow with the information you provided and it did what was required.

  1. I used the Account object
  2. Triggers on record update
  3. When the PersonMobile field is changed and not null, update Important Notes (FinServ__Notes__c) field with current DateTime:

enter image description here

I tested both scenarios where the mobile phone is changed to something else as well as when the mobile phone is removed and no other value is provided (thus field is null and flow should not trigger).

When it comes to using formulas for checking if a field is null/blank, Salesforce gives you ISBLANK and ISNULL, with the preferred one being ISBLANK for text fields.

I sometimes have sporadic success with ISBLANK and would rather use something more explicit such as {!$Record.PersonMobilePhone}<>"" which I have found to be more consistent.

I updated my formula used in the entry criteria of my flow to:

ISCHANGED({!$Record.PersonMobilePhone}) && {!$Record.PersonMobilePhone}<>""

and I got the same result.

Good luck!

You must log in to answer this question.

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