0

It is an exact copy of existing question. I need answer for this issue in formula field only. I found a small solution to it and given below.

IF( INCLUDES( Mul_Pick__c , "One"), "One" +',' , NULL) + 
IF(INCLUDES( Mul_Pick__c  , "Two"), "Two" +',' , NULL) + 
IF(INCLUDES( Mul_Pick__c , "three"), "Three" +',' , NULL) + 
IF(INCLUDES( Mul_Pick__c  , "four"), "four"  , NULL)

If we select all pick list fields, then only I can get exact output like one, two, three, four. If I select other than all fields, it will show like one, or two, or one, two, or one, three, two, and etc. But, what ever the fields I selected, the result should not be come comma at end of the fields.

Any ideas?

1 Answer 1

1

you can use two more formulas to achieve desired result: LEFT, LEN

LEFT(
    IF(INCLUDES(Mul_Pick__c, "One"), "One" +',' , NULL) + 
    IF(INCLUDES(Mul_Pick__c, "Two"), "Two" +',' , NULL) + 
    IF(INCLUDES(Mul_Pick__c, "three"), "Three" +',' , NULL) + 
    IF(INCLUDES(Mul_Pick__c, "four"), "four"  +',', NULL),
    (LEN(
        IF(INCLUDES(Mul_Pick__c, "One"), "One" +',' , NULL) + 
        IF(INCLUDES(Mul_Pick__c, "Two"), "Two" +',' , NULL) + 
        IF(INCLUDES(Mul_Pick__c, "three"), "Three" +',' , NULL) + 
        IF(INCLUDES(Mul_Pick__c, "four"), "four"  +',', NULL)
        ) - 1)
)
5
  • HI @Alexander Berehovskiy, Thank you for you share. Its working now
    – KS Kumaar
    Jun 16, 2017 at 10:36
  • Alexander Berehovskiy, I got one more issue, could you please help in this?
    – KS Kumaar
    Jun 16, 2017 at 12:23
  • @KSKumaar yes, is it related to the same formula? Jun 16, 2017 at 12:28
  • Yes. It is. Basically, I need to add a word between the last two words like One,Two,Three or Four and One,Two or Four and One or Four and three, four or two .
    – KS Kumaar
    Jun 16, 2017 at 12:33
  • Have you tried it. I tried for it. But result comes with failure always.
    – KS Kumaar
    Jun 16, 2017 at 13:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .