You need to sign in to do that
Don't have an account?
Raja Jammula
Formula Field for Multi select picklist
Hi, i have a scenario where i have a button where i am doing URL hacking and populating the values from one object to another object on click of a button.
The problem here is the button is called from two places. There is a field 'Product_Type__c ' which is a single picklist field and populates the value to the field-'product' on the destination. but on second place where we are calling the button the field is multi-select picklist field - 'Product_Categories__c ' and the destination field is same field - 'product'. when i am calling this it won't take the value from both the places.
so i thought of creating a formula field to populate the values and then use this formula field in URL hack of the button. but i am getting an error when trying to do it. the formula i am using:
IF( ISPICKVAL(Type, 'Multi-Product') , TEXT(Product_Categories__c ) , Product_Type__c )
as multiselect can't use text
can anyone help me
The problem here is the button is called from two places. There is a field 'Product_Type__c ' which is a single picklist field and populates the value to the field-'product' on the destination. but on second place where we are calling the button the field is multi-select picklist field - 'Product_Categories__c ' and the destination field is same field - 'product'. when i am calling this it won't take the value from both the places.
so i thought of creating a formula field to populate the values and then use this formula field in URL hack of the button. but i am getting an error when trying to do it. the formula i am using:
IF( ISPICKVAL(Type, 'Multi-Product') , TEXT(Product_Categories__c ) , Product_Type__c )
as multiselect can't use text
can anyone help me
this formula finally works:
IF( ISPICKVAL(Type, 'Multi-Product') , IF(ISBLANK( Multi_Picklist_1__c ), NULL, SUBSTITUTE( IF(INCLUDES(Multi_Picklist_1__c, "Multi"), "Multi, ", NULL) + IF(INCLUDES(Multi_Picklist_1__c, "Picklist"), "Picklist, ", NULL) + IF(INCLUDES(Multi_Picklist_1__c, "Fields"), "Fields, ", NULL) + IF(INCLUDES(Multi_Picklist_1__c, "Suck"), "Suck, ", NULL) + ".", ", .", NULL)) , TEXT(Product_Type__c ))
All Answers
This is what it does:
INCLUDES(multiselect_picklist_field, text_literal)
Determines if any value selected in a multi-select picklist field equals a text literal you specify.
Something along this lines: Hope it helps!
i tried it but i am getting error on that too. can you give me example.
i don't know whether it is correct here what i tried:
IF( ISPICKVAL(Type, 'Multi-Product') , INCLUDES(CSG_Product_Categories__c , "DC") ,Product_Type__c )
Error: Field Product_Type__c is a picklist field. Picklist fields are only supported in certain functions
Formula_Field__c =
then use this field (Formula__Field__c) output value in pre-populating the value on click of a button.
IF( ISPICKVAL(Type, 'Multi-Product') , INCLUDES(CSG_Product_Categories__c , "DC") , "DC" + BR(),Product_Type__c )
getting the error
Error: Field Product_Type__c is a picklist field. Picklist fields are only supported in certain functions
this formula finally works:
IF( ISPICKVAL(Type, 'Multi-Product') , IF(ISBLANK( Multi_Picklist_1__c ), NULL, SUBSTITUTE( IF(INCLUDES(Multi_Picklist_1__c, "Multi"), "Multi, ", NULL) + IF(INCLUDES(Multi_Picklist_1__c, "Picklist"), "Picklist, ", NULL) + IF(INCLUDES(Multi_Picklist_1__c, "Fields"), "Fields, ", NULL) + IF(INCLUDES(Multi_Picklist_1__c, "Suck"), "Suck, ", NULL) + ".", ", .", NULL)) , TEXT(Product_Type__c ))