To work around this problem, make a copy
of the user's area and modify that area. If you pass this new area
back to SetArea the current user's area will be set correctly. For
example.
hUserArea = GetArea(); ! get the current
users area
hTemp = GrpOpen("temp", 1): ! create a new group
GrpInsert(hTemp, hUserArea); ! copy user area into temp
... ! modify group as required, using GrpDelete, GrpInsert
etc
SetArea(hTemp); ! set the new user area
GrpClose(hTemp); ! close the temp group
Note that to set a new area, the current logged in user must
have the allowable Viewable Areas - to have that area selected. If
the user does not have rights to view that area, SetArea will
ignore that area. |