Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted (edited)

So, I can't figure out why this field is changing its own value.

I have a number field that acts as a button. When you click it, here is the entire script that it calls:


Set Selection [header::BILLTO]

Pause/Resume Script [indefinitly]

Set Field [header::discount; Case ((header::BILLTO = 2350 and header::SHIPTO ≠ 3166) or header::BILLTO = 373; .02; header::BILLTO = 1285 or header::BILLTO = 2122 or header::BILLTO = 830; .01; 0)]

Set Selection [header::SHIPTO]

The BILLTO field is the one that acts as a button to call this script. It then selects itself and pauses so the user can enter a customer number. Then it checks that number to see if it gets a discount, and if it does, it sets the discount field. Finally, it selects the SHIPTO field, and ends.

The next thing that needs to be understood is that the user can choose different pricing schemes for this invoice that's being made. We'll call them Schemes A, B, C... and they're listed in a drop-down list with a pre-defined value list. The field name is header::g_PricingScheme. There used to be another pricing scheme called "Customer Specific" but it was removed. It's function and operation has been changed, and is used somewhere else in a completely unrelated way.

This is where the problem comes in. Say the pricing scheme is set to "A", and the user then clicks the BILLTO to change it. At some point during the script, the pricing scheme field will change back to Customer Specific, even though it no longer exists in that value list. I've used the script debugger, and it seems to happen during the Set Field[] part of the script, but that doesn't make sense, since there is no call to set the pricing scheme field. The worst part is that the prices that are displayed are dependent on the scheme chosen, so when this happens, the prices all break, and appear as $0.00.

I've also gone through all of my other scripts. None of them even have the text "Customer Specific" anywhere in them. I am at a loss for where this is coming from, and any help would be greatly appreciated. Thanks.

Edited by Guest

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