Separate strings in a Text field using Formula:
Suppose we have a field named sample__c: with value opq,rst,uvw and we want to display splitting it in a,b,c,d fields respectively
1. For a__c, we want to display opq then TRIM(LEFT(SLASerialNumber__c, FIND(",", SLASerialNumber__c)-1))
2. For b__c, we want to display rst then LEFT(RIGHT(SLASerialNumber__c, LEN(SLASerialNumber__c) - FIND (",", SLASerialNumber__c)), FIND("," , RIGHT(SLASerialNumber__c, LEN(SLASerialNumber__c) - FIND (",", SLASerialNumber__c)))-1)
c. For c__c, we want to display uvw then
LEFT(RIGHT(SLASerialNumber__c, LEN(RIGHT(SLASerialNumber__c, LEN(SLASerialNumber__c) - FIND (",", SLASerialNumber__c))) - FIND (",", RIGHT(SLASerialNumber__c, LEN(SLASerialNumber__c) - FIND (",", SLASerialNumber__c)))), FIND("," , RIGHT(SLASerialNumber__c, LEN(RIGHT(SLASerialNumber__c, LEN(SLASerialNumber__c) - FIND (",", SLASerialNumber__c))) - FIND (",", RIGHT(SLASerialNumber__c, LEN(SLASerialNumber__c) - FIND (",", SLASerialNumber__c)))))-1)
Comments
Post a Comment