쉼표로 구분된 텍스트 필드에서 수식 필드를 만듭니다.
8377 단어 Salesforce
이런 것은 Apex 트리거로 split 함수를 사용하면 바로 할 수 있다.
라고 대답했지만, Apex는 싫다고. 많네요 Salesforce 세계에서는... Apex를 싫어하는 사람들.
나로부터 하면 간단하게 할 수 있는데, 일부러 복잡한 식으로 하고 싶은 사람들이 이상하다.
(또한 수식 항목이 싫어하는 이유로 검색할 수 없는 경우도 있습니다)
뭐, 한번 진지하게 식으로 써 보았습니다.
이런 텍스트 필드가 있다는 것
Street Name, City, State, ZIP
이를 별도의 수식 필드에 표시합니다.
결과는 생겼어. 귀찮지만...
St 이름
LEFT(address__c,FIND(',', address__c )-1)
시LEFT(MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )),FIND(',',MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )))-1)
StateLEFT(MID( MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) , FIND(',', MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) ) + 1, LEN( MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) )),FIND(',', MID( MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) , FIND(',', MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) ) + 1, LEN( MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) )) )-1)
ZipMID( MID( MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) , FIND(',', MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) ) + 1, LEN( MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) )) , FIND(',', MID( MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) , FIND(',', MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) ) + 1, LEN( MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) )) ) + 1, LEN( MID( MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) , FIND(',', MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) ) + 1, LEN( MID( address__c , FIND(',', address__c ) + 1, LEN( address__c )) )) ))
Formula field to get specific text from a longer text또한 또 다른 추가 악마
수식의 크기로부터 생각하면 이것이 한계일지도 모르겠네요. 4600 초과.
거리 이름 1LEFT(full_address__c,FIND(',',full_address__c)-1)
거리 이름 2LEFT(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)),FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))-1)
시LEFT(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))),FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))))-1)
StateLEFT(MID(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))), FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))) + 1, LEN(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))))),FIND(',',MID(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))), FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))) + 1, LEN(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))))))-1)
ZIPMID(MID(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))), FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))) + 1, LEN(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))))), FIND(',',MID(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))), FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))) + 1, LEN(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))))) + 1, LEN(MID(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))), FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))) + 1, LEN(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))))))
Get separate texts from 1 comma separated text
Reference
이 문제에 관하여(쉼표로 구분된 텍스트 필드에서 수식 필드를 만듭니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/Keiji_otsubo/items/c340ede7b44a30b89203
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
LEFT(full_address__c,FIND(',',full_address__c)-1)
LEFT(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)),FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))-1)
LEFT(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))),FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))))-1)
LEFT(MID(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))), FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))) + 1, LEN(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))))),FIND(',',MID(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))), FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))) + 1, LEN(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))))))-1)
MID(MID(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))), FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))) + 1, LEN(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))))), FIND(',',MID(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))), FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))) + 1, LEN(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))))) + 1, LEN(MID(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)))), FIND(',',MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))) + 1, LEN(MID(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c)), FIND(',',MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))) + 1, LEN(MID(full_address__c, FIND(',',full_address__c) + 1, LEN(full_address__c))))))))
Reference
이 문제에 관하여(쉼표로 구분된 텍스트 필드에서 수식 필드를 만듭니다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/Keiji_otsubo/items/c340ede7b44a30b89203텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)