Page 1 of 1 1
Topic Options
#126050 - 2004-09-02 01:39 PM Ingroup Case or If ???
simmons Offline
Lurker

Registered: 2004-09-02
Posts: 2
I fell into the Loginscript of someone else and try to understand it:
The Ingroup doesn't work this is the Code:
SELECT
CASE Ingroup ("@Cursus")= 0
$dep="cursist"
CASE Ingroup("@ICT") = 0
$dep="IT Rotterdam"
CASE Ingroup("@ARB") = 0
$dep="Employment & Benefit"
ENDSELECT

the $dep is filled in a kiXtart Form (not the right forum?)

after that it must map to a specific server\share
If $dep = "IT Rotterdam"
Use "F:" "\\IPSAN-RDAM\IT$"
Endif

But the only fill in I get is the last one ($dep=employment) and no mapping is set..
Any clues?
Should I specify $true=0 on top?

Top
#126051 - 2004-09-02 01:49 PM Re: Ingroup Case or If ???
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
The character "@" has a special meaning, so needs to be doubled up to protect it.

The return value for InGroup is "1" (KiXtart TRUE), not "0" if the user is a member of the group.

This is more like what you want, I think:

Code:

SELECT
CASE InGroup("@@Cursus")
$dep="cursist"
CASE InGroup("@@ICT")
$dep="IT Rotterdam"
CASE InGroup("@@ARB")
$dep="Employment & Benefit"
ENDSELECT



Top
#126052 - 2004-09-02 04:43 PM Re: Ingroup Case or If ???
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why combine CASE and IF and split the tasks between the two? Use CASE when they need to be mutually exclusive and IF when not.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.053 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org