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
sapthagiri_186sapthagiri_186 

Having multi-picklist in formula field

Hi, 

 

I got a requirement wherein if a user adds a new contact then certain fields of its respective account record's must get auto-saved. In this process, I have got a picklist and a multi-picklist in the account object and I am using formula fields to get them auto-saved. I could achieve this for picklist value however, I am not able to do the same for multi-picklist. So, could any know let me know if there is any other alternative to this.

 

Note : I am using Professional Edition

 

Regards

Vinita_SFDCVinita_SFDC

Hello,

 

Multi-picklist can be referred in formula fields but there are few constraints. Please refer following help link for details:

 

https://help.salesforce.com/apex/HTViewHelpDoc?id=tips_for_using_picklist_formula_fields.htm&language=en_US

sapthagiri_186sapthagiri_186
I would like to know if cross object formula fields support for multi-picklist.
Vinita_SFDCVinita_SFDC

Yes, multi-select picklist are supported in cross-object formula fields with only following functions:

    INCLUDES
    ISBLANK
    ISNULL
    ISCHANGED (Only in assignment rules, validation rules, workflow field updates, and workflow rules in which the evaluation criteria is set to Evaluate the rule when a record is: created, and every time it’s edited)
    PRIORVALUE (Only in assignment rules, validation rules, workflow field updates, and workflow rules in which the evaluation criteria is set to Evaluate the rule when a record is: created, and every time it’s edited)

sapthagiri_186sapthagiri_186

Thanx for the quick reply. I am using the following formula for picklist to have values from account auto populated into their respective fields in contact object, and this happens once the record is saved.

 

If(Text( Primary_Group__c) == '',Text( Account.Primary_Group__c),Text(Primary_Group__c))

 

Similarly, I have got another field, "Secondary Group", which in this instance is a multi-picklist. I tried using ISBLANK, but I did get a syntax error asking me to refer on how to use formula fields for multi-picklist fields.

 

Thanx again.

Vinita_SFDCVinita_SFDC

Hello,

 

I just tested and it is working for me. I created a multi-picklist multipick__c on Contact and included in a formula field on Accounts with return type text as:

 

IF(ISBLANK(Owner.Contact.multipick__c),'true','false')

sapthagiri_186sapthagiri_186

I am using it in the following manner :

            IF(ISBLANK(Secondary_Group__c), Account.Secondary_Group__c,Secondary_Group__c)

Here, "Secondary_Group__C is a multi-picklist, if it blank, then the value from its respective Account object (Account.Secondary_Group__c) must show up else not.

 

and I am getting the following error :

            Error: Field Secondary_Group__c is a multi-select picklist field. Multi-select picklist fields are only supported in certain functions. Tell me more

Vinita_SFDCVinita_SFDC

Hi,

 

You have Secondary_Group__c field on Account object, on which object are you creating formula? You can not refer a field directly, without providing relationship in the formula field which is on another object.

sapthagiri_186sapthagiri_186

I have Secondary_Group__c field both in "Account" and "Contact" objects and I am creating the formula field on "Contact" object

Vinita_SFDCVinita_SFDC

Okay, i think you are returning picklist value directly instead of the text. Try like:

  IF(ISBLANK(Secondary_Group__c), Text(Account.Secondary_Group__c),Text(Secondary_Group__c))

If this doesn't work then change the field name on either object.

sapthagiri_186sapthagiri_186
Sorry, this hasn't worked and was getting the same error as above. And created new fields and tested it as well.
Vinita_SFDCVinita_SFDC

Strange, i would suggest you to log a case with support for investigation because it is working for me.

sapthagiri_186sapthagiri_186
Okay and thanx for helping around.