You need to sign in to do that
Don't have an account?
maybemedic
Dependency between a Picklist and Text field
Hello All,
I am very new to Salesforce just a couple of days old. I am not even a Salesforce resource, but given the responsibility of making some changes to an existing object. We have an object with several fields. The requirement is that if a particular picklist value say, ABC_c is selected then three text fields need to be validated accordingly, i.e if ABC_c picklist is selected, then the user that enters values in these three text fields should enter atleast 10 chars long string, if not an error should be thrown to the user. I can see that we could create dependency between picklists, but this case of a picklist and text field, I am unaware of it. Any help is greatly appreciated. Also, it would be great if someone could point me to a tutorial where I can learn to write these validation rules. Thanks a zillion.
I am very new to Salesforce just a couple of days old. I am not even a Salesforce resource, but given the responsibility of making some changes to an existing object. We have an object with several fields. The requirement is that if a particular picklist value say, ABC_c is selected then three text fields need to be validated accordingly, i.e if ABC_c picklist is selected, then the user that enters values in these three text fields should enter atleast 10 chars long string, if not an error should be thrown to the user. I can see that we could create dependency between picklists, but this case of a picklist and text field, I am unaware of it. Any help is greatly appreciated. Also, it would be great if someone could point me to a tutorial where I can learn to write these validation rules. Thanks a zillion.
You will need to build from the validation rule below. It is a validation on two text fields but can be used for more.
AND(
NOT(ISPICKVAL(Picklist__c, "")),
OR(
LEN(Text1__c) < 10,
LEN(Text2__c) < 10
)
)
I did pretty much the same and validated two text fields.
Hello tmac,
You will want to use something like the one below for that validation rule.
This checks to see if there is a value in the text field and if the picklist does not contain "square feet" it will give them an error.
Chris,
This is the validation rule that I am using:
AND(LEN( Square_Footage__c ) > 0,
(ISPICKVAL( " SF_Range_for_Dashboard__c "))
I apologize because I think I missed something when I originally posted, because when I entered the validation rule in your reply I recieved a syntax error so the above validation rule is revised. So it should read, if the text field is not blank then you must complete the square footage range picklist field. However, I continue to receive a syntax error.
I notice that I often get errors that indicate a parenthisis is missing. I know this is a sidebar but is there any training that you recommend for data validation. I am pretty new at this.
Thanks so very much for your help.