#128954 - 2004-11-03 04:01 PM
Problem with 'if' and OR logic
|
misty
Fresh Scripter
Registered: 2004-10-14
Posts: 31
|
I can't seem to get the syntax right for this. I'm trying to test if someone is in the group Engr or Truss or Receptionist, and if they are in one of those, to do some condition. Here is what I have but it doesn't work:
IF INGROUP("Engr") OR INGROUP("Truss") OR INGROUP("Receptionist")
|
Top
|
|
|
|
#128960 - 2004-11-03 05:26 PM
Re: Problem with 'if' and OR logic
|
Anonymous
Anonymous
Unregistered
|
IF INGROUP("Engr") or INGROUP("Truss") or INGROUP("Receptionist") ; Make sure the user can run MATLIST -- they need a .get file and it gets ; created automatically if they don't have one (copied from one that works) IF NOT EXIST("\\corpsrv\data\batch\paths\@USERID.get") ;cp \\corpsrv\data\batch\paths\jenny.get \\corpsrv\data\batch\paths@USERID.get ENDIF
; The program was written to use a variable that exists in Novell but not NT, so we set it here SETM "LINAME=@USERID" ? "LINAME set to @USERID" ; for MATLIST program -- look in %L\DATA\BATCH\PATHS\username.get
; Set up drive mappings here (X will go away eventually) USE L: \\corpsrv\engr USE G: \\corpsrv\apps USE Q: \\corpsrv\data USE U: \\corpsrv\utils use X: \\corpsrv\X ENDIF
I get an error in the kixtart script if I have the IF line setup that way. If I take out everything but INGROUP("Engr") it works fine.
|
Top
|
|
|
|
#128963 - 2004-11-03 05:46 PM
Re: Problem with 'if' and OR logic
|
Anonymous
Anonymous
Unregistered
|
As usual I was making it too difficult!! Thank you!
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 248 anonymous users online.
|
|
|