October 7, 200520 yr 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...
October 7, 200520 yr 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
October 12, 200520 yr 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