0

I am creating a workflow that will remove a check from a checkbox field if certain values are not included in a multi-select picklist field.

This works great when I just need to determine if a single text_literal is not included. However, I'm having difficulty with writing an or statement to check for the presence of multiple text_literals.

I am using the Process Builder. Here is the full setup of the process.

The object is Assessment_through_Deactivation - I want the process to run on creation and edit, allowing for recursion.

enter image description here

Criteria 1 evaluates whether or not a multi-selection picklist contains certain values, using 'OR'. If any of the noted values become contained in the multi-selection picklist field, the checkbox called 'EC' becomes 'true'. This executes only when the specified changes are made to the record. This works well and is what I want to happen here.

enter image description here

Criteria 2 should evaluate if a multi-selection picklist does not include any of the noted values (after looking at this again, && 'AND' is actually what I want here). I want this to remove the check from the 'EC' checkbox when none of these values are included in the multi-select picklist. This would also execute only when the specified changes are made to the record.

enter image description here

Here is the formula I currently have that does not un-check the box.

NOT(INCLUDES([Assessment__c].SH_System_Rec_Components__c, "Door Opener with remote and/or push pad")) && 
NOT(INCLUDES([Assessment__c].SH_System_Rec_Components__c, "Environmental Control Via iPad/Tablet")) && 
NOT(INCLUDES([Assessment__c].SH_System_Rec_Components__c, "Automatic Door Opener")) && 
NOT(INCLUDES([Assessment__c].SH_System_Rec_Components__c, "Smart Thermostat"))
6
  • 1
    you'll want && (AND) versus || (OR) assuming you're trying to ensure that it doesn't include any of those strings? By using OR, as long as one of those strings is not included it will meet your criteria. Jul 27, 2021 at 20:26
  • I want to know if any of the strings are not included, it doesn't necessarily have to be all of them. I think II (OR) is the intended use here. Jul 27, 2021 at 20:39
  • I'm just not certain as to why the above formula isn't functioning. Jul 27, 2021 at 21:21
  • I would do a sanity check first - is the latest version of the PB activated? Is the node being evaluated (make sure if there's any criteria before it that it's set to evaluate next criteria). I don't think there's anything wrong with your formula. Jul 27, 2021 at 21:26
  • You're totally right, I did want && instead of || - Sorry about that - I've updated the question above to show all of my process. Jul 28, 2021 at 13:26

1 Answer 1

1

Your general requirement is, based on a list of some values within a multi-picklist, do the following:

  1. if any are selected - check a box
  2. if none are selected - uncheck a box

Scenario 1 is working for you as you utilized || (OR) which will return true if any condition is true. In other words - as long as one of those values is included in the multi-picklist, it'll return true.

Scenario 2 is not working as you were utilizing || again, which goes against your requirement. You want to check that none of those values are selected and thus need to use && (AND) to confirm none of those values are included. In other words - if any of those values are included, your expression returns false.

NOT(INCLUDES([Assessment__c].SH_System_Rec_Components__c, "Door Opener with remote and/or push pad")) && 
NOT(INCLUDES([Assessment__c].SH_System_Rec_Components__c, "Environmental Control Via iPad/Tablet")) && 
NOT(INCLUDES([Assessment__c].SH_System_Rec_Components__c, "Automatic Door Opener")) && 
NOT(INCLUDES([Assessment__c].SH_System_Rec_Components__c, "Smart Thermostat"))

You must log in to answer this question.

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