I have a scenario where i m showing marked only records with some filters based upon the permissions in contact card. I want that when user presses showall button in toolbar, he/she should not be able to veiw all the records. Any suggessions/Solutions ? Thanx in advance.
I think that the use of “FILTERGROUP” property will do your job. Before setting your filter write the following code: FILTERGROUP:=2; In this way you make your filtering specific to group 2 and it cannot be modified from the user.
I want to apply the filters on more than one fields randomly where filtergroup will not be a foolproof. Any other suggestions… Thanx
Girish, You need to use FILTERGROUPs. You can set filter on any field and more than one field. User usually can see filter group # 0. So you can do like this:
FILTERGROUP(10); //Sets your filter group SETFILTER(Field1,Filter); //Sets filters in this group SETFILTER(Field2,Filter); ... FILTERGROUP(0); //Returns to users filter group
Arthur, I have to apply the filters randomly as i wrote before, for example, one user is permitted to view the records of Area 1,3,7,22…n. If i apply the filtergroup, it will pickup the last applied filter on that field. I want to show all the records within the range i have specified randomly. And one more thing that the user will pe putting the new records in the same form, so i can not use temporary tables too.
I’m sorry but have you actually tried reading the online help for the FILTERGROUP function?
Girish has a point, I’m afraid. The special filter MARKEDONLY(TRUE), it seems, doesn’t work within FILTERGROUP, and thus
I want that when user presses showall button in toolbar, he/she should not be able to veiw all the records.
is not possible (at least not when using MARK and FILTERGROUP)
But the only way I remember to completely hide records from the User is by setting filters on filter groups other than 0, either explicitly (though a code call to the FILTERGROUP function) or implicitly (by defining the SourceTableView property). True, MARK will not work with FILTERGROUP. Consider different approaches, but remember that they all depend on FILTERGROUP’s: 1) Different Forms for different groups of Users. Too many forms, too confusing. 2) A new field on the Contact table which represents the group of Users which have access to the particular record. This would need to be updated together with the remaining information of the Contact. 3) Finding some way to filter the records which would not require the use of Marks. In any of these cases, I think you will find the property PopulateAllFields must be set to TRUE.
Hi One possibility would be to add a new field to “User Setup” eg “Contact Area Filter” Text 250 Then you could enter the filter for each user. Then your could on the form could read like This
UserSetup.GET(UserID); FILTERGROUP(2); SETFILTER(Area,UserSetup."Contact Area Filter"); FILTERGROUP(0);
Thanx everyone for replying. The Matter is resolved by using the flowfields. Thanx
Huh [?] FlowFields? Can I ask you to please explain the solution, I’m interested.