Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5413 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (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 B) 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 by Guest
Posted

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

Posted

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.

Posted

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

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted (edited)

This is what works 100% for me. Not sure why "go to record [first]" is necessary? but without it it doesn't work.

Picture_3.png

Edited by Guest

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.