
Hi
I have below code . How it work
IF UserSetup.GET(USERID) THEN
BEGIN
UserSetup.TESTFIELD("Location No.");
IF (UserMgt.GetUserInfo2(USERID) <> '' )THEN BEGIN
FILTERGROUP(2);
SETRANGE("Location No.",UserMgt.GetUserInfo2(USERID));
FILTERGROUP(0);
END;
END;
FILTERGROUP(2);
Thanks
*This post is locked for comments
I have the same question (0)For more information about the filtergroup check this
docs.microsoft.com/.../filtergroup-function--record-
In simple terms filtergroup is just a group of all the filters you have applied.
The default filter group is 0, so in the above case you have specified the FILTERGROUP 2 and applied the filter for Location code, then you changed the filtergroup to zero, but later again you changed the filtergroup to 2, so in the end you are in same filter group which you have used to applied the filters, it means the user can remove those filters.
You need to be in the same filter group to remove the filters. If you remove the last line FILTERGROUP(2) then user don't have a way to remove the filter.