AnsweredAssumed Answered

Using multiple global fields to filter a list

Question asked by Steveb on Mar 21, 2011
Latest reply on Mar 21, 2011 by Steveb


Using multiple global fields to filter a list



I'm busy setting up my first database and I've been doing fine following along on the VTC tutorials but I recently run into a problem which no amount of searching seems to solve.

Right now I'm trying to build a list view which will filter clients in list mode based on a set of global fields set in the header.  I want to be able to find and sort these contacts based on more than one global field. i.e. find all my clients that do not have orders in currently but have also not been contacted for this season's orders or alternatively who have been contacted but have not replied.

'xcurrent order' is based on a value list with 3 values "Yes", "No", and "Both", the none global 'current order' only has "Yes" and "No" and uses a different value list
'xstatus' has 5 values "Not Contacted", "Contacted", "Replied", "Reminded", and "Not Teaching/On Sabbatical"

Right now my script looks like this:

Set Variable [$xcurrent order; Value:Professor::xcurrent order]
Set Variable [$xstatus; Value:Professor::xstatus]
If [$xcurrent order = "Both"]
     Perform Find [Restore] (find criteria: Professor::status = Professor::xstatus)
     Perform Find [Restore] (find criteria: Professor::current order = Professor::xcurrent order)
     Constrain Found Set [Restore] (find criteria: Professor::status = Professor::xstatus)
End if
Sort Records (by last name)

Any suggestions would be very much appreciated!