Hello All,
I need to filter entries by "Windows user group" from entries. This table is customized local table. "User ID" field must be filled by "Windows user group name" when insert into table. But it filled by last "Windows user group name". How can I find correct "Windows user group name"?
IF WindowsLogin.FINDSET THEN
REPEAT
TempLogin.INIT;
WindowsLogin.CALCFIELDS(ID,Name);
TempLogin."User ID" := ShortUserID(WindowsLogin.ID);
IF TempLogin."User ID" <> '' THEN BEGIN
TempLogin."Windows Login" := TRUE;
TempLogin."Windows Login ID" := WindowsLogin.ID;
TempLogin.Name := WindowsLogin.Name;
TempLogin."Windows Login SID" := WindowsLogin.SID;
TempLogin.INSERT;
END;
UNTIL WindowsLogin.NEXT = 0;
CLEAR(TempLogin);
TempLogin.SETCURRENTKEY("User ID");
TempLogin."User ID" := USERID;
IF TempLogin.FIND('=><') THEN
"User ID" := TempLogin."Windows Login ID";
0