SM76 Posted April 2, 2007 Posted April 2, 2007 Hi, I'm trying to manage an email address database. The records contain a name, an email address, a building and a position. I would like to be able to search for building and position and any combination. let's say I have two positions, 1 and 2 and three buildings, A, B and C I would like to write an email to: All records with position 1 in Building A (got this, this is easy) or All records with position 1 and 2 in buildings B and C (this is the tricky part where I don't know how to perform the find to accept two checked boxes and show me both) anybody? thanks a bunch M.
SM76 Posted April 2, 2007 Author Posted April 2, 2007 Hi Ender, the position and the building fields are both checkbox fields .. Position: 1 2 Building: A B C
Ender Posted April 2, 2007 Posted April 2, 2007 All records with position 1 and 2 in buildings B and C (this is the tricky part where I don't know how to perform the find to accept two checked boxes and show me both) Unless you're not being very precise with your wording, checking boxes 1, 2, B, & C should find those records that have boxes 1, 2, B, & C checked (be sure that these fields are all of type Text).
SM76 Posted April 2, 2007 Author Posted April 2, 2007 Hey, maybe I'm not being precise enough, here goes another attempt: I have 2 checkboxes, one is called 'position' and one 'building'. 'position' has the checkbox options: 1 and 2 'building' has the checkbox options: A, B and C I already am able to check (for example) 1 and B and get all email addresses that match those criteria. What I want to be able to do is extend this search and be able to check 1 AND 2 as well as B AND C and have all records display that match either: 1 OR 2 AND B OR C I'm sure it has something to do with extending a find, but I can't seem to be able to directly access values in the checkbox field. thanks!
Ender Posted April 2, 2007 Posted April 2, 2007 An OR search is a little different. For that, you need a Find request for each combination. In this case, a request for each position and each building, like this: Request 1: Position: 1 Building: B Request 2: Position: 1 Building: C Request 3: Position: 2 Building: B Request 4: Position: 2 Building: C Such requests can be manually entered (Records->New Request), or you could build a scripted routine that shows the fields that can be searched, waits for the user, then builds the find requests. In this case, a script would loop through the selected Positions, then through the selected Buildings.
Ender Posted April 2, 2007 Posted April 2, 2007 Another method could use a self-join multi-criteria relationship from a couple globals to the Position and Building field, and then use a Go to Related Records[] step to jump to the related records.
SM76 Posted April 2, 2007 Author Posted April 2, 2007 hm .. I think programming all the different options is not really an option, given that I have ~ 40 buildings .. doesn't make any sense .. I am trying to figure out the self-join multi-criteria relationship .. can you be a bit more specific with respect to what global fields you suggest and how they relate to the position and building? thanks a lot
Ender Posted April 2, 2007 Posted April 2, 2007 The looping method is more complex to script, but uses very little overhead. The globals with a GTRR (Go to Related Records) uses several fields and a complex relationship, but the script is pretty simple. If the find could include a variety of other criteria, I'd stick with the looping script. It's easier than setting up filters for each possible field with the relational method. Either way, it doesn't matter how many buildings or positions your checkbox sets have. Both methods are demonstrated in the attached sample file (requires version 8 or later). boxes.fp7.zip
SM76 Posted April 2, 2007 Author Posted April 2, 2007 Thanks a lot! I have actually figured out a round-about way using a dedicated button for 'extend search' .. I just use radio buttons instead of check boxes (this way there is only one input at a time) then click on search, change the radio buttons and click on extend search .. works like a charm, with one little exception, it seems to clear my position field in a certain found set every now and then .. that's what I'm debugging right now .. I'll look into your scripting later .. thanks a lot!
Recommended Posts
This topic is 6502 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now