I have a fairly new codelocked command file that is supposed to set rules on or off that I thought worked:

cls
show rules

SWITCH (.%1)

CASE 'OFF'
SET VAR vTypedName = (CVAL('USER'))
SET USER ********
SET RULES OFF
show rules
SET USER .vTypedName
BREAK

CASE 'ON'
SET USER *******
SET RULES ON
show rules
SET USER .vTypedName
BREAK

ENDSW

show var vTypedName
show rules
RETURN

(The ***** masks the plain text version's owner.)

When I run the RMD file the "show rules" before the "SET USER .vTypedName" lines indicates that the rules have been set correctly but when the case is 'OFF' and the user name is set back to its original the rules setting reverts to 'ON'


eg: start on to change to off:
(RULES    ) ON  Check data validation RULES
(RULES    ) OFF Check data validation RULES
public
(RULES    ) ON  Check data validation RULES

and for start off to change to on:
(RULES    ) OFF Check data validation RULES
(RULES    ) ON  Check data validation RULES
public
(RULES    ) ON  Check data validation RULES


Is this expected? I can see a certain amount of logic if it were intended...

Regards,
Alastair.


----------------------------
Alastair Burr
St. Albans, UK.
[EMAIL PROTECTED]
-----------------------------

Reply via email to