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.

Making a script to run another script based on value list

Featured Replies

Hey guys, you've been a lot of help so far. I'll try to make this my last question for a while...

I have a global field called gReport. There's a pop up menu with a valuelist of the names of my reports that I have in another table. I want to make it so that when a user chooses one of the reports from the listbox and pushes the command button I can somehow run a script that basically says:

perform script(reports::scriptname)

So it'd be a script that tells filemaker to run a different script that is named the exact same as the report name (these are allready defined). So to put this in a nutshell, I'm looking to run different scripts using a pop up list. Any ideas? Thanks to all...

Levi777:

A simple way you can do that is via an If[] statement based on the value of your gReport field; thus your button would have this script attached to it:

If [yourDB::gReport="Your Listitem 1"]

Perform Script [yourScript1]

ElseIf [yourDB::gReport="Your Listitem 2"]

Perform Script [yourScript2]

ElseIf ... etc...

End If

-Stanley

Levi--

Stanley's answer is the usual way that FM developers have handled the execution of reports by a selected value. However, that solution gets ugly if you have more than just a few reports, and completely breaks down if you add reports to an already-deployed app. Well, okay, you can rewrite the scripts and have your clients install an update.

A better solution is to check out the free plug-in EventScript by Softwares for Humans at http://www.softs4humans.com/FMPro_Plugins.html

I think it will do exactly what you're looking for.

HTH,

David

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.