gtag Posted January 27, 2010 Posted January 27, 2010 (edited) Not sure how to go about this but.... I have a DB of Athletes that compete at various levels, both men and women. I would like to add a way for a user to select A) Pro or Amateur and Men or Women, and then show only records that coincide with those selections. Ideally one option from each category would always have to be "on" so that it would never show all records. I have a "gender" field ("Men" or "Women") and a "type" field ("Pro" and "Am"). Anyone want to point me in the right direction? Many thanks. Edited January 27, 2010 by Guest
dayzrespite Posted January 27, 2010 Posted January 27, 2010 do a search for conditional value lists. think that's what you're looking for
The Big Bear Posted January 27, 2010 Posted January 27, 2010 try this in a find script make to new gobal fields such as g_gender and G-type. make a drop list for each one that would show man or woman for the g_gender and a drop list for the other. enter find mode setfield(gender;g_gender) new record request setfield(type;g_type) preform find this should get you what you are looking for. Lionel
efen Posted January 27, 2010 Posted January 27, 2010 ...or you can "find" the relevant records with a portal. See attached athletes.zip
gtag Posted January 27, 2010 Author Posted January 27, 2010 Awesome. Both of these last two solutions are great. BEAR: Question for your find script - How can I add an option to show ALL records? What I've done is use your script and added radio buttons (I removed "New Record/Request" because it was only using one of the two fields to perform the search - without it uses both fields and works like a charm). I assume here that I will need an If/Then line in my script? Thanks again.
The Big Bear Posted January 27, 2010 Posted January 27, 2010 I am not sure what you mean about an option for show all record. If no records were found , you could use an IF statement. If found count =0 show all records end if Lionel
efen Posted January 27, 2010 Posted January 27, 2010 Are you not changing what you originally asked for? 1st post Ideally one option from each category would always have to be "on" so that it would never show all records. 2nd post How can I add an option to show ALL records? If you use the portal method you can use the radio buttons that you have created to "find" all records (press Shift while selecting the "off" choice in each radio button set). Or you can choose all amateurs or professionals, or all men or women. Or use checkboxes for the selection choices instead of radio buttons
gtag Posted January 27, 2010 Author Posted January 27, 2010 yeah - funny - I implemented the script and then realized that I needed to be able to see them all. Sorry! I'll try your if no records found script.
efen Posted January 27, 2010 Posted January 27, 2010 I'll try your if no records found script. There are no scripts in my sample file? If you mean that you will try the other method suggested in the other post then you shouldn't need this other script because using that find will always show some records (if the only options that can be searched for are men/women and pros/amateurs). A simple Show All Records button will do the same as the 3-line script suggested
gtag Posted January 27, 2010 Author Posted January 27, 2010 The reason I ended up needing the "All" option is to be able to show ALL amateur athletes, or all pros. I've figured it out using probably way to many script lines - I'll post it when I've got it working 100% so you guys can show me how to do it much easier. Thanks so much for your attention though - it really does make life WAY less frustrating to get good advice like this.
gtag Posted January 27, 2010 Author Posted January 27, 2010 (edited) This is what works 100% for me. Not sure why "go to record [first]" is necessary? but without it it doesn't work. Edited January 27, 2010 by Guest
Recommended Posts
This topic is 5413 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