function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chad RitchieChad Ritchie 

Formula for splitting field

Hi everyone,

I have this field that's populated via an API (OrderComments__c)

Here are two examples:
JOHN | CHNL_APPROVED |
JAKE | IP_OVERRIDEN | Test 1
JEFF | MGR_APPROVED |

JOHN | CHNL_APPROVED |
JEFF | MGR_APPROVED |


Now my question is, is it possible to write a formula that would extract JEFF from the first and second example. The second seems pretty straight forward, you would just have to find string between second and third |     

But the first example seems to be a lot harder, is there any logic that could be written into a formula to recognize JEFF without also bringing in Test 1?

Thanks! 
Zachary SingerZachary Singer
Hi Chad,
This may be helpful as a method for finding line breaks in a formula https://salesforce.stackexchange.com/questions/18909/find-line-break-in-formula-field