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
jayesh pagarejayesh pagare 

How to remove unwanted comma getting during "rocky-1,james-2" ..

I have field called adjuster history with record 'rocky-1,james-2,John-3'  for getting first string record  used formula as"LEFT(Cust_field__c, FIND("-", Cust_field__c)-1)" but if i removed rocky from database then adjuster history is like ',james-2,John-3' and i get result as ",James-2 " how do i remove unwanted comma from the result.??????
 
William TranWilliam Tran
LOGIC: Remove the first comma if it exists

Something like this:
 
IF(LEFT(Cust_field__c,1) = ",",

RIGHT(Cust_field__c,LEN(Cust_field__c)-1),Cust_field__c)

As a common practice, if your question is answered, please choose 1 best answer. 
But you can give every answer a thumb up if that answer is helpful to you. 

Thanks