You need to sign in to do that
Don't have an account?
Georgia2
Making a lookup field required based on a pick list
Hi
I have two look up fields on an Oppty- a look up to an Account (Ship to Account) and a look up to a custom object (Shipping Address).
I have a pick list for type of Shipping Info: Ship to Account or Shipping Address.
I need a validation rule that so if Shipping Info is a Ship to Account than Ship to Account field is required otherwise Shipping address is required.
Thoughts?
Thanks
Here you go, Happy Thanksgiving ;-)
OR(AND(ISPICKVAL(Picklist_Field, "Option-1"), LEN( Lookup_Field_1 ) < 1), AND(ISPICKVAL(Picklist_Field, "Option-2"), LEN( Lookup_Field_2 ) < 1))
All Answers
Here you go, Happy Thanksgiving ;-)
OR(AND(ISPICKVAL(Picklist_Field, "Option-1"), LEN( Lookup_Field_1 ) < 1), AND(ISPICKVAL(Picklist_Field, "Option-2"), LEN( Lookup_Field_2 ) < 1))
Very good- thanks! How do I mark as solved? For some reason I can never find this.
Thanks
I had to change my encoding to Right-to-Left Document to see this. any idea how I can get my computer screen to show everything? Often times, the solutions are cut off on the right hand side; probably due to the same thing...
Thanks
Am having trouble hijacking your syntax, seems like it should be simple:
AND(ISPICKVAL( StageName , "Closed Won"), LEN( Won_Reasons__c ) < 1)
Error: Field Won_Reasons__c is a picklist field. Picklist fields are only supported in certain functions. Tell me more
Thanks for any help on this.
As the error message states, your custom field Won Reasons is a Picklist, you cannot use a LEN function on a Picklist field.
Try something like
AND(ISPICKVAL( StageName , "Closed Won"),ISPICKVAL( Won_Reasons__c , ""))
Or better yet, since your requirement is Closed/Won you don't even need to evaluate the Stage Name picklist, you can just evaluate the IsWon field
AND( ( IsWon ), ISPICKVAL( Won_Reasons__c , ""))
PS. You should use the Code Clipboard when you post formulas, it makes them a lot easier to read/