Jump to content
Sign in to follow this  
videopuppy

Running a script when field is entered, how?

Recommended Posts

Hello,

Is there a way to run a script (FMP script) when a field has data entered into it? e.g. A customer is selected (using a KF field related to it's KP field), and when selected a script runs.

Thanks

Dave

Share this post


Link to post
Share on other sites

Well give one of the myriad of plugs with event-trigging a stab of being put inside a native validation which always is evaluated true.

I have no use for such scripting, because I rely entirely on jointable free many2many relations, the native validation and autoenter with the "update..." function selected, in the defs.

Filemaker is different from SQL systems in having excellish calc'fields.

--sd

Share this post


Link to post
Share on other sites

What do you actually want to DO? What does the script accomplish?

Share this post


Link to post
Share on other sites

What I'm trying to accomplish is this.

I have two fields on my customers layout, 1 is a credit limit field and the other is invoice total.

I have a script that looks at both to see if the invoices total (billed and not yet paid) is greater than the credit limit and if so it pops up a dialog. I would like for this to run each time a customer is selected (from a pull down menu) for a new quote/invoice.

Thanks

Dave

Share this post


Link to post
Share on other sites

It might be better to make the customer selector field a global field and add a button "New Invoice" next to this field. Then the script can validate the customer and display a dialog if the customer doesn't meet the credit rules.

Share this post


Link to post
Share on other sites

When you select the customer?? I'm not sure I follow your work logic. If you're trying to prevent your users from creating a new invoice for an over-the-limit customer, you might try using a value list that only displays customers whose invoice totals are less than their limit.

Going out on a limb (that I am sure LaRetta will cut off behind me :) ), if you want to check whether the current invoice surpasses the client's limit, I think you could use a validation to pop up a message. Mind you, I'm not an expert on validation...

David

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.