I work for a software company as a trainer, and along the way have been writing SIMPLE "smart functions". I had a request from a client today that I really want to figure out for them. Just when I get it to work, I think of another area that I am missing...
They want to populate a field based on the following criteria:
R_Sphere and L_Sphere have to be between a -2.00 and 4.00
FOCALTYPE is Single Vision Lenses
PLANNAME is like VSP (VSP Signature, VSP Choice, VSP Value)
R_Cyl and L_Cyl is -2.00 or less...or blank.
Here is my messed up script:
var
R_SPHERE: Real;
L_SPHERE: Real;
PLANNAME:
String;
FOCALTYPE: String;
begin
IF SF.TABLEINEDITMODE ('FRAM_RX') then
begin
R_SPHERE:=sf.getfieldReal('Fram_Rx','R_Sphere');
L_SPHERE:=sf.getfieldReal('Fram_Rx','L_Sphere');
PLANNAME:=Sf.GetFieldText('FRAM_RX','PLANNAME');
FOCALTYPE:=SF.GetFIeldText('FRAM_RX','FOCALTYPE');
begin
IF (((PLANNAME = 'VSP Signature') OR (PLANNAME = 'VSP Choice') OR (PLANNAME = 'VSP Value'))) then
begin
IF (((R_SPHERE <= '4.00') and (R_SPHERE >= '0.25') and (R_SPHERE >= '-0.25') and (R_SPHERE >= '-4.00') and (L_SPHERE <= '4.00') and (L_SPHERE >= '0.25') and (L_SPHERE >= '-0.25') and (L_SPHERE >= '-4.00'))) then
begin
SF.AssignFieldText ('FRAM_RX','OPTICALLAB','City Optical Lab');
end;
end;
end;
end;
end;
Can anyone PLEASE PLEASE help me?