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

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

Recommended Posts

Posted

Greetings

I am busy developing a scorecard incentive programme for our sales team. I have created a database "Scorecard". In this database are various tables, one of which is "Margin". The only data I need in the "Margin Table" is "Total of Subtotal", "Nett Sales Less Support", "Total GP Sales" and "Total GP Sales Percentage".

I have placed this table in the file that houses all of our company's databases.

What I want to do is create a script which goes to the "Invoices Table", goes to a layout which finds the sales for the specified Sales Person and imports the data to my Margin Table. Thus far, I have managed to create a script in the "Margin Table" which sets global fields for Sales Person and Date Range. I then go to the "Invoices Table", set the relevant fields from the global fields and perform the find.

My problem now lies in getting the data from the find from the "Invoices Table" to the "Margin Table".

I think that I need to take the found data and set those to global fields. The last line in both screen shots attached show an attempt to set the global for "Total of Subtotal" from the field "Total of Subtotal" in "Invoices" and then go to my "Margin Table" and set the "Total of Subtotal" field there from the global field.

I am not, however, getting this right. When I perform the script I get an error message "This action cannot be performed because this field is not modifiable". I have checked all field and they are modifiable so I am now stumped.

I am very (very) new to scripting so please forgive me!

Picture_10.pdf

Picture_11.pdf

Posted

Did you define the globals to be calculations? You cannot edit calculation fields.

Posted

For that matter, are you sure your "global" fields have global storage? Also, minor points: I don't think you need the Pauses in your script. FileMaker will automatically wait for the previous script step to finish before continuing. Nor do you need to Pause when entering Find mode, unless you're going to manually enter some criteria. Nor do you need to explicitly Open a file. Perform Script from the other file is sufficient.

Posted

Thank you for the tips... yes... I made a really silly mistake and globals weren't switched on as globals...

Need to be more careful but the script works perfectly!

Thanks again!

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