Oyseka Posted October 18, 2011 Posted October 18, 2011 Hi All, I want to validate a field to be not empty and contain a specific number of digits if the text in another field meets specified criteria. I have a field called Account_type, if the choice in that field is "Account" then I want to force the inclusion of a ten digit account number in the Account_Number field but only if the text "Account" is specified. I know this should be an easy If or Case statement but I am not getting it right.
Vaughan Posted October 18, 2011 Posted October 18, 2011 Case( account_type = "Account" ; not isempty( account_number) and length( account_number ) = 10 ; 1 )
comment Posted October 18, 2011 Posted October 18, 2011 Try = Account_Type ≠ "Account" or Length ( Account_Number ) = 10
Oyseka Posted October 18, 2011 Author Posted October 18, 2011 Case( account_type = "Account" ; not isempty( account_number) and length( account_number ) = 10 ; 1 ) Thank you Vaughan, that works. Would you explain the 1 as the second part of the Case statement please.
Oyseka Posted October 18, 2011 Author Posted October 18, 2011 Try = Account_Type ≠ "Account" or Length ( Account_Number ) = 10 Thank you Comment, this also works. Is there a functional difference between this and Vaughan's method
Recommended Posts
This topic is 5033 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now