Hello,
I have an object where case workers document their clients' contact with their family.
We have a multi-select picklist where they can choose the people the client had contact with. It's multi-select because sometimes the client has a visit with multiple family members.
I wanted to create a few formula checkbox fields that would be checked if the multi-select picklist field contained certain values.
I cannot get this formula to work. There are several options that would mean the visit was with parents or siblings. For instance, for siblings there are the values of "Brother", "Sister", "Foster Sibling", "Adoptive Sibling."
I want a formula that checks the box if the multi-select picklist contains any of those values (sometimes of course it may have "Birth Mother" AND "Sister" but I want the box to be checked any time a sibling is listed, even if other family members are listed too). However, even when I create a successful formula with no errors, it still doesn't work.
I created this formula (after much trial and much error) and it had no errors but when I created a record to test it and only put "Sister" into the field, the checkbox was still unchecked. So, clearly this isn't working.
IF(INCLUDES(Relationship__c, "TEXT(Brother)"), True,
IF(INCLUDES(Relationship__c, "TEXT(Sister)"), True,
IF(INCLUDES(Relationship__c, "TEXT(Foster Sibling)"), True,
IF(INCLUDES(Relationship__c, "TEXT(Adoptive Sibling)"), True,
False
)
)
)
)
Any ideas what I'm doing wrong?
10 respuestas
You are pretty much there. Nested can be a pain. Just have to count the number of closing )'s.
IF(INCLUDES(Relationship__c, "Brother"), True,
IF(INCLUDES(Relationship__c, "Sister"), True,
IF(INCLUDES(Relationship__c, "Foster Sibling"), True,
IF(INCLUDES(Relationship__c, "Adoptive Sibling"), True,
False
)
)
)
)