STRING_APPEND_UNIQUE

Description

Appends an item to an existing string using the specified separator unless the item already exists.

Syntax

STRING_APPEND_UNIQUE(existing_string, item, separator) -> String

Parameters

ParameterData TypeRequiredDescription
existing_stringStringYesThe string to append to.
itemStringYesThe string to append.
separatorStringYesThe separator used between items.

Examples

STRING_APPEND_UNIQUE(ProductOfInterest__c, "Marketing Automation", ";")
-- Returns "CRM;Marketing Automation" when ProductOfInterest__c already contains "Marketing Automation".
STRING_APPEND_UNIQUE(ProductOfInterest__c, "Analytics", ";")
-- Returns "CRM;Marketing Automation;Analytics" when ProductOfInterest__c contains "CRM;Marketing Automation".

Related Formula