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

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

Recommended Posts

Posted

Here is a tough one!

I would like to run a script based on the value of a field

ie: Fieldx = happy

Instead of using if statement in my script such as

if fieldx=happy

perform script happy

end if

if fieldx=sad

perform script sad

end if

i would prefer to bypass the if statement and

perform script (value)fieldx

is this possible?

Stu

Posted

Sad, but true - present versions of FileMaker don't provide a way to use field values to directly determine which script is to be run, but require you to do the hard slog of building up your own selection procedure using a nest of If[ ] steps.

But as Queue has observed, the feature you're looking for would be nice - so I'd encourage you not to let it rest there, but to pay a visit to the FMI feature request page and suggest that it be included in a future version. The URL for requests of this kind is:

http://www.filemaker.com/company/product_feature_request.html

I've already done so myself, but if enough folks make the suggestion, you just might see it in a future version. wink.gif

Posted

I would like to run a script based on the value of a field

ie: Fieldx = happy

is this possible?

No prob with applescript.

copy cell "WhichScript" of current record to whichScript

do script FileMaker script whichscript

It's also possible using the shell script plugin to do this automatically just entering a value in a field.

Posted

If anyone is interested I figured it out using the Troi Activator Plugin.. Following is the two line script

External("Actr-StartListener", "54242" & "|" & Status( CurrentFileName) & "|xxxxxx")

External("Actr-SendRemoteEvent","54242" & "|" &External("Actr-GetIPAddress", "")& "|" &"xxxxxx" & "|" &Status( CurrentFileName) & "|" & act_Script_to_run & "|" & "" & "|" & "")

Thanks for the feedback

Stu

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