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.

Activating scripts from popup list

Featured Replies

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.

Heathbo

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

Dean

  • Author

Thanks thats helpful. What is a trigger script and how does it work?

  • 3 weeks later...

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

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.

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

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

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

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.

So there is no flashing as there is on Macs. It also only works with a menu, whereas Macs require a list.

...and a manditory button next to it, if the userinterface rules should be obeyed - This is why I developed http://www.fmforums.com/threads/download.php?Number=87872 ...which includes the posibility to regret ...very mac'ish!!

--sd

Try this ... with loop ... fp7

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

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

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.

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.