Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Selecting records to display

Featured Replies

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

do a search for conditional value lists. think that's what you're looking for

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

...or you can "find" the relevant records with a portal. See attached

athletes.zip

  • 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.

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

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

  • 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.

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

  • 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.

  • Author

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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.