You need to sign in to do that
Don't have an account?

Formula field with multiple conditions using picklist...
Hello Everyone!,
I need to create a formula field that will update a field with text based on certain criteria.
Ex: If division_c = yes and BCP = yes, update the formula field with AAABBBCCC. I have tried multiple varitions of the ISPICKVAL () using AND, IF and nothing seems to work.
Any help is greatly appreciated!
I'm assuming the field you want to update is text, correct? If it's a picklist, you can only pre-select a value which means you would need multiple workflow rules.
To set a value in a text field, you just need to have the result be the value. For example. Assuming the 2 fields you are checking are picklists:
IF(AND(ISPICKVAL(Division__c, "Yes"), ISPICKVAL(BCP__c, "Yes")),"AAABBBCCC", "")
The formula will result in "AAABBBCCC" if both Division and BCP are Yes, otherwise it will return a null. If you want to leave the original value in the field, just replace the last part with the name of the field you are updating. This should give you a good start. If you are still having trouble, please post the actual field names and types and I can help construct the actual formula.
All Answers
I'm assuming the field you want to update is text, correct? If it's a picklist, you can only pre-select a value which means you would need multiple workflow rules.
To set a value in a text field, you just need to have the result be the value. For example. Assuming the 2 fields you are checking are picklists:
IF(AND(ISPICKVAL(Division__c, "Yes"), ISPICKVAL(BCP__c, "Yes")),"AAABBBCCC", "")
The formula will result in "AAABBBCCC" if both Division and BCP are Yes, otherwise it will return a null. If you want to leave the original value in the field, just replace the last part with the name of the field you are updating. This should give you a good start. If you are still having trouble, please post the actual field names and types and I can help construct the actual formula.
Thanks for you formula, but unfortunately, I am still receiving an error message: Error: Incorrect parameter for function ISPICKVAL(). Expected Picklist, received Text
This is formula I used: IF(AND(ISPICKVAL( Division__c , "Yes"), ISPICKVAL( Sell_any_BCP_or_PRI_lines__c , "Yes")),"AAABBBCCC", "")
I would like the field to be a text field, only if both conditions are met.
Actually, the Division field was a formula field that was being pulled from the Account object, which was picklist field. So I created a picklist field on the Contract object (did not put it on page layout) and it worked like a charm!
Thanks again for your help!
If this field is on the Contract object, you have access to the Account fields directly in a formula without having to create a new field. You can reference the Account's Division field by using Account.Division__c in your formula.
IF(AND(ISPICKVAL(Account.Division__c, "Yes") ......
Perfect! Thanks! I was sure if I could reference different object in a formula field.
Thanks.