January 27, 201015 yr 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, 201015 yr by Guest
January 27, 201015 yr 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
January 27, 201015 yr ...or you can "find" the relevant records with a portal. See attached athletes.zip
January 27, 201015 yr Author 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.
January 27, 201015 yr 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
January 27, 201015 yr 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
January 27, 201015 yr Author 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.
January 27, 201015 yr 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
January 27, 201015 yr Author 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.
January 27, 201015 yr Author 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, 201015 yr by Guest
Create an account or sign in to comment