Jump 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.

GlobalField not saving value after close

Featured Replies

I have come around an unexpected behaviour:

At end of the day all invoices are deleted from the file:

The last invoiceNumber will be put into a GlobalField 'gLastInvoiceNumber'.

Then all invoices are being deleted. Records = 0, I can see the value in 'gLastInvoiceNumber'.

Than close file.

Re-open file again: it has lost the value of the GlobalField 'gLastInvoiceNumber'.

Any idea why this happen, any workaround?

Note: The file is remote on FileMaker server. This behaviour is not happen as local file!

Cheers

Greg

Edited by Guest

  • Author

Note: The file is remote on FileMaker server. This behaviour is not happen as local file!

It seems FM server is not saving the value in the globaField when Records = 0

Any help available?

Cheers

Greg

I have come around an unexpected behaviour:

No you haven't ... it might however not be what you expected!

http://www.filemaker.com/help/05-Create%20a%20database20.html

...and if you read it thoroughly, will you discover that your conclusions are somewhat wrong.

But the question is why not use autoenter values in non globals for this serialization business, and why delete records at all? Invoicing ought strictly speaking follow this approach:

http://www.databasepros.com/FMPro?-DB=resources.fp5&-lay=cgi&-format=list.html&-FIND=+&resource_id=DBPros000717

--sd

--sd

Just an additional explanation: http://faq.filemakermagazine.com/index.php/Global_fields

  • Author

Is this it?:

-"If your file is shared, only the host's changes to global field data are saved. Changes are saved only when the file is closed.

- If a file is shared, some calculations that include global fields are evaluated on the host instead of on the client."

Does this mean, Global fields on a client are not stored on the host? If so, is there a workaround?

But it says: " Changes are saved only when the file is closed." This is not happening.

Note: This is an old FM 6 development converted to FMP 9. It is like renovating a very old house ... always again there are new surprises. A complete re-write is no option. (Invoices are processed in batches and deleted from the invoice when done)

Cheers

Greg

Invoices are processed in batches and deleted from the invoice when done

....And we can just guess what this processing is, can't we? You need to explain why things are done this way and what is done.

What is deleted?

--sd

  • Author

...processing was just a note. Not part of the problem.

I will run the file locally only and bypass the problem.

Thanks

Greg

"If your file is shared, only the host's changes to global field data are saved. Changes are saved only when the file is closed." - Relates to when a file is hosted off another FileMaker client, not filemaker server...

If all invoices are deleted, why don't you just use an auto enter serial for the invoice ID?

...processing was just a note. Not part of the problem.

Not quite sure about that, if say your data-model is daft as a brush, will all scripting suffer from it - doing all kinds of needless shenanigans. You might not realize what a proper structure might do for your urge to script!

If say your itemlines would be outfitted with an extra foreign-key to signal a completion of a delivery, would there be no need to delete anything ... if you delete something could it suggest you have the same data stored twice since legislation will force you to keep track of the business' dealings anyway.

But relational approaches seek to eliminate such syncronization, by storing each atomic data into just one single location. Deletion of delivered items, can only make sense if you have the same data stored twice ... why not keep at the straight and narrow and implement a proper invoicing system, that both satisfy the tax authorities as well as being an agile relational approached solution, with minimal syncronization required?

--sd

Create an account or sign in to comment

Important Information

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

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.