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

Activating scripts from popup list


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

Recommended Posts

Posted

OK, heres what I want to do. I have a pop-up list with 5 options to select from (wich come from a value list). I need to run based on the pop-up list. For example: If option 1 is selected, script 1 runs. If option 2 is selected, script 2 runs. And so on and so on. I have no idea how to go about doing this. Any help you can give is much appreciated.

  • 3 weeks later...
Posted

Heathbo

Attached is a easy way to do what you want if you dont want to us a script trigger.

Dean

This works but requires two clicks: the first click runs the script and sets the field; the second click runs the script again using the (previously set) field value to choose a course of action--at least that's what I found using the example.

I can't expect users to click twice; it's not normal behaviour for buttons. Is there any way that a script can collect the result of a popup choice on the same click?

  • Newbies
Posted

I have run into this exact situation myself. I ultimately moved the options from that pop-up list to a separate "Control Panel" window. Unfortunately, that's a "messy" siluation because users must first click the window and then click a button within.

I do not want to use plug-ins because the database is still early in development and I'd rather restrict development to just what's possible within Filemaker Pro/Server alone.

Posted

See here for a Mac solution. You can find this and several other related threads by searching for +"pop-up" +script.

Posted

Thanks, Queue. It's not utterly perfect (it still requires two clicks, but with the list staying down, the second click is 'asked for') but it does work. [sometimes I miss HyperCard so much! All these interface voids and workarounds just never came up.]

I've attached a FM7 updated example file that compares a parameter with the clicked field and, so, doesn't need the second global field to store the original field state.

What's happening here, by the way? Is FM updating the field during the pause in the script? Has anyone experimented with a minimum pause or would that be machine dependent?

Pseudotrigger_param.fp7.zip

Posted

Sometimes I miss HyperCard so much! All these interface voids and workarounds just never came up.

HyperCard have not vanished into thin air, I know of FSA'ers who deliberately develops UI's that works the IWP interface in RunRev...which is what HyperCard as approach, is continued as.

http://www.runrev.com/

...and by it makes linux workstations speak to a filemakerbase - Checkout!!!

--sd

Posted

I'm not certain how it functions for Macs. Windows doesn't require a loop, just a simple pause for 1 second, until a selection is made or the field is clicked out of. So there is no flashing as there is on Macs. It also only works with a menu, whereas Macs require a list.

Posted

Soren, it's easy enough to add a cancel feature without getting too complicated. Just add dialog after the loop (Mac) or pause (Win) to accept or cancel the selection. If cancel is selected, set the field with the global holding the value from the beginning of the script. No temporary records or relationships are necessary.

  • 2 weeks later...
Posted

MMScript has a script trigger plugin that if functional and pretty cheap. It'll do what you want with a field validation. When the user selects a choice from the list the script will run. The developer was very responsive to my questions also.

If you want to get more advanced I think that SecureFM key trapping will do the job too. (I think....)

Posted

You could also use EventScript to activate the script, if you aren't plug-in averse. Works very nicely and provides an excellent user-interface. Nice way to allow someone to browse across both sides of a relationship, too.

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