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

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

Recommended Posts

Posted

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

Posted

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

Posted

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

This topic is 6985 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.