Hi all,
I have some code that works.
But the problem is that the formula that works does the opposite of what I need it to do. If the role code is there, it gives the error message, but I need to check for the negative. Like the first example. I need to have it check that it is NOT in code [1,64], but I can't seem to find how to check it. I tried these (two formulas below), but got errors. I can't just look for an empty field, cuz it could have several role codes. I just need to check that these specific role codes are present so that I can give an error message if they are not present.
Thanks for your help!
Lareya
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Crystal 8.5; SQL database; MS Windows 2K; ORSOS/One Call Hospital Scheduling System v10.1.2; Huge Newbie to Crystal! Operating Room RN Analyst
I have some code that works.
Code:
WhileReadingRecords;
Local StringVar strValidate2;
IF {POST_RESOURCE.ROLE_CODE} in [1,64] then // No Provider Code
if strValidate2 = "" Then
strValidate2 := 'Please Check the Provider Field'
else strValidate2 := strValidate2 & chr(13)& chr(13) & 'Please Check the Provider Field';
IF {POST_RESOURCE.ROLE_CODE} in [12] then //No Circ Staff Code
if strValidate2 = "" Then
strValidate2 := 'Please Check the RN Staff Field'
else strValidate2 := strValidate2 & chr(13)& chr(13) & 'Please Check the RN Staff Field';
);
strValidate2;
Code:
IF {POST_RESOURCE.ROLE_CODE} <> in [1,64] then // No Provider Code
if strValidate2 = "" Then
strValidate2 := 'Please Check the Provider Field'
else strValidate2 := strValidate2 & chr(13)& chr(13) & 'Please Check the Provider Field';
Code:
IF {POST_RESOURCE.ROLE_CODE} Not( in [1,64] )then // No Provider Code
if strValidate2 = "" Then
strValidate2 := 'Please Check the Provider Field'
else strValidate2 := strValidate2 & chr(13)& chr(13) & 'Please Check the Provider Field';
Lareya
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Crystal 8.5; SQL database; MS Windows 2K; ORSOS/One Call Hospital Scheduling System v10.1.2; Huge Newbie to Crystal! Operating Room RN Analyst