2

Been banging my head on getting IsChanged and IsNew to work in Process Builder. I'm looking for the first two statements to be true and then check to ensure "Request for Portal User" is true but only fires if it's new value.

AND(
(($Setup.Hierarchy_Settings__c.Skip_Process_Builder__c == False), 
 ([Contact].RecordType.DeveloperName == $Label.Contact_Record_Type))  
    OR(
    AND(
        ISNEW(),
        NOT(
            ISBLANK(
                TEXT([Contact].Request_Portal_User_Account__c == True)
                )
            )
        ),

    AND(
        ISCHANGED([Contact].Request_Portal_User_Account__c == True),
        NOT(
            ISBLANK(
                TEXT([Contact].Request_Portal_User_Account__c == True))
                )
            )
        )
)   
1
  • Text function always expect a number,string, date, datetime value but you are returning boolean. Are you able to save above? What exactly are you trying to do? Commented Sep 18, 2018 at 17:22

1 Answer 1

5

This formula snippet

        ISBLANK(
            TEXT([Contact].Request_Portal_User_Account__c == True)
            )

is never going to evaluate to true. The text value of that Boolean expression would always be a non-blank string ("True" or "False"), if this even compiles.

Remember that the NOT() function takes a Boolean, and Checkbox fields are Booleans. You can pass one to the NOT() function directly.

If we make those substitutions, remove some of your extra parentheses, and add a comma (I don't believe your formula as written will compile), you come out with

AND(
    NOT($Setup.Hierarchy_Settings__c.Skip_Process_Builder__c), 
    [Contact].RecordType.DeveloperName == $Label.Contact_Record_Type,  
    OR(
        AND(
            ISNEW(),
            NOT([Contact].Request_Portal_User_Account__c)
        ),
        AND(
            ISCHANGED([Contact].Request_Portal_User_Account__c),
            NOT([Contact].Request_Portal_User_Account__c)
        )
    )
)

That's going to be true if the first two conditions are true, and Request_Portal_User_Account__c is false on a new record or is changed to false on an existing record.

2
  • NOT($Setup.Hierarchy_Settings__c.Skip_Process_Builder__c)?
    – sfdcfox
    Commented Sep 18, 2018 at 18:19
  • Thank you very much, yes my condition wasn't working but all the error message said was "missing a ')'" so I didn't have much to go off of. Thanks again!!
    – Watson
    Commented Sep 18, 2018 at 19:03

You must log in to answer this question.

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