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
SaiPoojitha DurgempoodiSaiPoojitha Durgempoodi 

if x(text) field is filled out then Y(picklist) field should also be filled,can someone help me with the validation rule?

if x(text) field is filled out then Y(picklist) field should also be filled,can someone help me with the validation rule?
VinayVinay (Salesforce Developers) 
Hi SaiPoojitha,

Try below validation.
AND(NOT(ISBLANK(x__c)), ISBLANK(y__c))
Please mark as Best Answer if above information was helpful.

Thanks,
Hakuna MatataHakuna Matata
Sure, here's a validation rule that should meet your requirement:
AND(
  NOT(ISBLANK(X__c)),
  ISBLANK(Y__c)
)
In this validation rule, X__c represents the API name of the text field, and Y__c represents the API name of the picklist field.
The validation rule checks if the text field is not blank and the picklist field is blank. If both conditions are true, the validation rule fires and displays an error message indicating that the picklist field is required when the text field is filled out.
You can customize the error message to fit your needs. For example:
AND(
  NOT(ISBLANK(X__c)),
  ISBLANK(Y__c)
),
"Y field is required when X field is filled out"
--
Manok na Pula