Goal: Hide the display of all files not relevant to graphic design users.
The code is comprised of two Xinet Portal stored procedures, that when used together filter Search results directly within the Search Engine, namely sp_RunSearchPostFilter(), which filters Browse and Search results and
sp_NavigatorPostFilter(), which filters Navigator results. This method works better with Portal 4 (and later) than the PHP method described beginning on
page 788 because it is faster: filtering takes place within the Search Engine, and properly updates Search and Browse paging counts as well as the Navigator’s file- and directory-item counts.
In code example, shown below, the first procedure, sp_RunSearchPostFilter, employs an
IF statement that includes
g.GroupName='design_group' which tells the Portal Search Engine to apply the filter if the user’s
Primary Group is
design_group. If the group matches, the
DELETE statement filters the results. You can change this specific part of the
DELETE statement to suit your needs:
This code means whenever Field137 does not have a value of
Design or
Public, or if it is null, that file will be filtered out.
The second procedure, sp_NavigatorPostFilter, provides these three functions:
Like the first procedure, the IF statement checks for
design_group, and filters items. It then updates the
file and
dir counts with two
UPDATE statements. You can change this specific part of each
UPDATE statement to suit your needs:
Remember to change both UPDATE statements, or your navigator counts will be incorrect.