Skip to main content
spencer_engel
Expert ⭐️
June 25, 2019
New Idea

Allow split string formula in Rules Engine

  • June 25, 2019
  • 11 replies
  • 187 views
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 ⭐️⭐️⭐️
    June 25, 2019
    For that scenario can you just first do a left (or right) substring and then do a right (or left) substring on the output?

    VP of Customer Success at Forcepoint
    spencer_engel
    Expert ⭐️
    June 25, 2019
    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.

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

    VP of Customer Success at Forcepoint
    spencer_engel
    Expert ⭐️
    June 26, 2019
    Ha, I know! I was able to do what I needed in Excel in about 30 seconds.

    jitin_mehndiratta
    Helper ⭐️⭐️⭐️
    July 16, 2019
    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.

    sai_ram
    Expert ⭐️⭐️
    December 2, 2019

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

     

    spencer_engel
    Expert ⭐️
    December 2, 2019

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

    Helper ⭐️
    February 10, 2020

    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.

    Anastassia Goidina
    Contributor ⭐️⭐️⭐️⭐️⭐️
    July 21, 2021

    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  
       
    Muthu Kumar Karuppiah
    sai_ram
    Expert ⭐️⭐️
    July 21, 2021

    @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.