Skip to main content
Salesforce Bot (Endeavor) 님이 #Data Management에 질문했습니다
I'd like to know if it's possible to strip text in a Formula.

 

I have a Picklist called Office__c. The Options look like this:

 

Argentina

 

Argentina - Cordoba

 

Argentina - Cuyo

 

Argentina - NOA

 

Argentina - Patagonia

 

Argentina - Rosario

 

I have a Formula field called Office_Group__c. What I'd like to do is strip the above field and enter in the first part of the text.

 

If a user selects "Argentina - Cuyo" the formula would take that and remove " - Cuyo" then only print "Argentina"

 

Also: Dependent picklist is not an option here.

 

Ideas?
답변 5개
  1. 2016년 8월 15일 오후 8:42
    You can  add IF CONTAINS to do your exact requirement

     

    Try this: 

     

    IF(CONTAINS (TEXT(Office__c), "-"), LEFT(TEXT(Office__c),FIND("-", TEXT(Office__c))), TEXT(Office__c))

     

     
0/9000