Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Global Fields and Exporting Field Contents

Featured Replies

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

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

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.

  • Author

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!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.