Skip to main content
spencer_engel
Expert ⭐️
Jun 25, 2019 5:26 PM UTC
New Idea

Allow split string formula in Rules Engine

I've come across a scenario where I need to parse out values contained in a multipicklist and have discovered that I don't have a good way of doing this in the Rules Engine. I can do a LEFT substring and a RIGHT substring, but for any scenario where the value is A;B;C;D - I don't have a way to grab the B and C values. Can we please introduce a split string formula to take care of this use case?

    11 replies

    dan_ahrens
    Expert ⭐️⭐️⭐️
    Jun 25, 2019 5:42 PM UTC
    For that scenario can you just first do a left (or right) substring and then do a right (or left) substring on the output?

    Translate
    VP of Customer Success at Forcepoint
    spencer_engel
    Expert ⭐️
    Jun 25, 2019 6:32 PM UTC
    Take the example above for a value that contains a multipicklist value of A;B;C;D. If I do a left substring on the semicolon, I get value A. Then I do a right substring on the semicolon and get value D. There's no way to get values B or C.

    Translate
    dan_ahrens
    Expert ⭐️⭐️⭐️
    Jun 26, 2019 9:48 PM UTC
    Ah good point. I'm so used to nesting formulas in Excel and forgot that we can't nest in Gainsight. :)

    Translate
    VP of Customer Success at Forcepoint
    spencer_engel
    Expert ⭐️
    Jun 26, 2019 11:55 PM UTC
    Ha, I know! I was able to do what I needed in Excel in about 30 seconds.

    Translate
    jitin_mehndiratta
    Helper ⭐️⭐️⭐️
    Jul 16, 2019 6:30 AM UTC
    Hi Spencer, Did you try using the Substring function?

    You can extract the values B & C in the example that you mentioned via Subtring function.

    Let me know if that works for you.

    Translate
    sai_ram
    Expert ⭐️⭐️
    Dec 2, 2019 3:54 PM UTC

    @spencer_engel did you get a chance to view the comments posted by @jitin_mehndiratta 

     

    Translate
    spencer_engel
    Expert ⭐️
    Dec 2, 2019 3:56 PM UTC

    Yeah, I reviewed it, but it didn’t solve what I needed.

    Translate
    Helper ⭐️
    Feb 10, 2020 5:37 PM UTC

    Came across a case for this too, where our data from Salesforce is already concatenated into one row due to a multiselect field and needing to merge with another dataset were each value is on a separate row. Not finding a way to do this via Gainsight is frustrating.

    Translate
    Anastassia Goidina
    Contributor ⭐️⭐️⭐️⭐️⭐️
    Jul 21, 2021 10:24 AM UTC

    The Find String functionality is a must needed feature. For example, please refer to the below strings. I would like to get the first part of the string from the first letter till "-”.   From “CUSTOMER SUCCESS - CUSTOMER CARE TAM” I would like to extract “CUSTOMER SUCCESS”. From "CUSTOMER SUCCESS MGMT - PSM” I would like to extract “CUSTOMER SUCCESS MGMT”. There is no way to achieve this using the Gainsight String Formulas. 

     

    In Excel, we can achieve this by writing a nested formula as below

     

    =LEFT("CUSTOMER SUCCESS - CUSTOMER CARE TAM",(FIND("-","CUSTOMER SUCCESS - CUSTOMER CARE TAM")-1))

    Result will be: CUSTOMER SUCCESS

    =LEFT("CUSTOMER SUCCESS MGMT - CMM",(FIND("-","CUSTOMER SUCCESS MGMT - CMM")-1))

    Result will be: CUSTOMER SUCCESS MGMT

    CUSTOMER SUCCESS - CUSTOMER CARE TAM  
    CUSTOMER SUCCESS - CUSTOMER CARE CLOUD  
    CUSTOMER SUCCESS - RENEWAL MANAGEMENT  
    CUSTOMER SUCCESS MGMT - CMM  
    CUSTOMER SUCCESS MGMT - PSM  
    CUSTOMER SUCCESS MGMT - ENTERPRISE  
       
    Translate
    Muthu Kumar Karuppiah
    sai_ram
    Expert ⭐️⭐️
    Jul 21, 2021 3:45 PM UTC

    @kumaranbcak sorry for the inconvenience, Please give a look into the documentation here, you will find a way to do it. Mean while I will also check the possibility from my end too.

    Translate