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.

Multiple search / scripting

Featured Replies

Hi there,

My school assessment database is about to move into its 2nd year.

This means that on the whole I'll only want to view classes from the 2014-15 academic year, not from the 2013-14 academic year.

 

I've a global field for gAcademicYear in the Classes table, and also an AcedemicYear field for each class. - Both can be populated from a value list created by an Academic Year table.

 

I was going to have a drop down, for gAcedemicYear with a modify trigger to run a script, something like this one I found:

Set Variable [$companyToFind; Value:Budget::CompanySort]

Enter Find Mode

Set Field [budget::Company; Value:"==" & $companyToFind // "==" tells FileMaker you want exact matches only]

Perform Find []

 

 

Does that seem feasible so far?

 

Secondly, I also want to filter down by class type - class, ensemble or instrumental lesson, with in the set found from the AcademicYear find.

At the moment, I've just got a simple button triggering a simple find that works well - do I include the script above each time now, to avoid find all the ensembles there have ever been?

 

Many thanks!!

Mike

 

P.S.

Is there an idiots guide to FM scripting somewhere? - I find this really tricky!

 

P.P.S

I'm off to Lanzarote tomorrow, so please don't be offended if it takes me a while to reply - I'm not sure what the internet will be like.

 

 

 

Hi Mike,

 

You talk about the Academic Years, but show a field called CompanySort in your script sequence. What is this?

 

For training in FileMaker, check out the FileMaker Training Series. They are a great resource.

 

As for doing a multiple criteria Find, if you want an AND Find (As in you only get classes in the year 2014-2015 and type "class") you set all the fields with the values you want to Find.

 

If you want to perform an OR Find (As in you get classes in the year 2014-2015 and also classes of type "class"), you must use New Record/Request to make a new request for each criteria you want to find.

 

Let me know if this helps or you need further clarification.

 

-JohnAustin

  • 4 weeks later...
  • Author

Many thanks John,

Just back from holidays and starting on this now! :-/

 

The example I showed was an example from a different database - I haven't found much info on scripting sorts and am a beginner!

 

I'll let you know how I get on :-)

Cheers,

Mike

  • Author

Brilliant - it's now working :-)

 

  1. I've got one drop down to select gAcademicYear.
  2. Then I've got three buttons to select either class, ensemble or individual lesson.
  3. And finally a button to show everything.

 

All the filtering works fine.

 

But, it's not very user friendly.

I think it would be more user friendly to have a 2nd drop down for class , ensemble etc.

I don't know how to write the script to trigger the appropriate searches - is it possible to trigger depending on drop down choice?

 

Cheers,

Mike

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.