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

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

Recommended Posts

Posted

I have a vaule list that is from a seperate table. I need to run a script when a vaule is selected from the list. Also need it to be conditional based on what they choose.

Example:

list have values 1, 2, 3, 4, 5.

When choose 2, run script x and store "2" value in value list field

when choose 2, run script y and store "1" value in value list field

Posted

Either use an event plug-in, or simply put a "go" button next to the pop-up list that users click on to make it all happen.

  • 3 weeks later...
Posted

I am lot with the plug-in and really want to stay away from that. I am really surprised that there is no way to create a field that processes a script when the date is changed from a dropdown menu. Here is exactly what I have and maybe there is something else that can be done other than the plug-in.

I have a field called JobStatus which is a dropdown menu, from a table(a related DB in FM terms for 5.5) and validated to only contain those values. This field is created in a DB called JobTickets. I have an AppleScript written for sending emails to users when you hit a button to do so when the status changes for a job. I just want to elimnate that button step for the user because some times people forget to click the button to update eveyone with the email script. So I am trying to remove that error factor and want a script to lauch anytime that field is changed but do it automatically.

Any suggestions???

Posted

George,

I feel your pain but unfortunately you can't do what you want to do without a plugin or a "Go" button. I know because I tried to do the same thing and found out on my own that FM doesn't do that sort of thing. It's no different on a PC than on a MAC.

If you assign a script to an object, the first thing that happens when the object is clicked is that the script is executed. Basically it preempts the possiblity of selecting a value in the drop down menu. So what happens is that the script runs and the value in the dropdown menu never changes.

Franklly, Vaughan's suggestion is about the best and cleanest there is.

the Mad Jammer

Posted

Not quite true. You can do this with a list on a Mac and menu on Windows. It is easier to implement on Windows.

To elaborate:

Go to Field ["yourFieldFormattedAsMenu"]

Pause/Resume Script [1 second]

If [yourFieldFormattedAsMenu = 1]

Perform Script ["This"]

Else If [yourFieldFormattedAsMenu = 2]

Perform Script ["That"]

.

.

.

End If

Disallow access to the field in Browse Mode, and you should be set.

Posted

Nothing personal Queue, but I avoid looping script stuff.

There is another alternative if you are using FMP 6 or later: make the field into a button that brings up a Custom Dialog that prompts for the new entry, then checks if the entry is different and performs the necessary process as required.

The disadvantage is that the field can no longer be tabbed-into and it requires the use of the mouse.

Posted

I agree, Vaughan. But on Windows, no looping is involved; that is only on the Mac side.

I like the Custom Dialog idea.

I should add that you can set a global with the value of the field (if any) at the beginning of the script, then test whether it has changed once a selection has been made. If the global equals the current value, then you can Exit Script. This works great in 5.5, where Custom Dialog is not available.

Posted

What Queue posted works fine on Windows. In fact you can set the pause to be '0:00:00' which in Filemaker land is probably not really 0, but I never looked into whether its really as much as 1 second.

Steve

Posted

It's no different on a PC than on a MAC.

But the expectations to the punishments likely ...differs. Apple have following guidelines:

Is it consistent with people

Posted

I use scripted pop-ups menus. I've never had one misfire. My impression is that Windows Users may like them more than Mac Users (a quick scan of the respondees to this thread may support this statement as well). I learned the techniques from Queue (Windows) and CobaltSky (XPlat) - what does that tell ya? I recently read a great article (I think from Soren) on the 'Windows experience' and how each OS group expected different things when performing actions (on a Mac site, I believe).

I believe that the 'User experience' may vary per OS and carry through many aspects of design. Scripted pop-ups are powerful tools which can trigger action upon selection for goodness sakes!!! It is no different than a button except it provides options and then easily displays the selected option after leaving it. It isn't a space overcrowd issue, Soren. On customer form layout, button says Sort By: - popping it displays separated list of sort options. After selection, their selected sort displays on the button. Takes no space, looks good, works great, makes sense to users because it IS (and looks like) a button.

I think (for once and maybe only once), we Windows people have one up on you. And I think Mac people are jealous because pop-up menus are better than pop-up lists and fire from script so nicely. I really like Macs and have one on the top of my list. I want all the wonderful things they do that Windows' sucks at. But I'm keeping my scripted pop-ups!!. [spoilerq:1]POOF!![/spoilerq]

[spoilera:1]

I'm kidding about the jealously part of course but not about the power of scripted pop-ups. And now LaRetta will hide until the firestorm clears. Let me know when it's safe to come out, JT! ;)[/spoilera]

LaRetta

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