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.

Misscalculations in a Network

Featured Replies

  • Newbies

Hi,

i am using FM Adv 8.5, in a network.

i need to creat a new record (like a new invoice) and provide it with a new number as a result of a given parameter.

in my case the use of the built in function "next serial number" is not possible because the numbers are not always consecutive.

i use a GLOBAL field in the file, into it a script sets the last value after each time i create a new record. and a field for the RECORD NUMBER.

when a new record is created - the script goes to that RECORD NUMBER field and Set the new record number as: record number = Last GLOBAL + 1. then it sets the global field as last GLOBAL = GLOBAL +1.

the problem: the script works fine when only one user is working. when more then one is working - (using open remote) the numbers do not synchronize.

the use of global variables did not help either. the script does not seem to function in the network.

Any help and advices will be appriciated.

thanks,

shurum

Hi Shurum and welcome to the forums

If I have understood you correctly the problem is that you have stored your required number in a global field.

Global fields are not only one value for all records but they are specific to each user ie each user can have their own data, different to any other user, in any global field.

This is one of the strengths of global fields and makes them a very powerful tool to have in your box but it does mean that they cannot be used to store details across a multi user solution as you have found.

The way round this might be to set up a table with a field to hold the next/last invoice number. You can relate this by setting up a constant (x-type) relationship to all tables that might reference this data thereby making it available to all users

HTH

Phil

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.