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.

I need a script that will edit 1 function from multiple records

Featured Replies

Basically there is now a need to take an offline copy of the database to customer's sites.

 

we will be accomplishing this via Mirrorsync.

 

In order to prepare the database i had to add a UUID field that gets generated automatically when a record is modified/created.

 

Its a basic function that converts the date stamp and the record ID into a numeric UUID.

 

This works for data going forward but I have 10,000+ records of data with no UUID.

 

I need to create a way to go through each old record and modify it enough to kick in the auto-generating of the UUID field. 

 

Otherwise I would have to do it manually or Mirrorsync wont run since it doesnt like empty UUIDs in records

Solved by Jesdamian

Go to solution

Go to your field definitions on the UUID.  Change it to type calculation (BACK UP YOUR FILE FIRST).  Enter your calculation and be sure to set it to number result.  And it must be stored so in storage options be sure it is NOT checked 'do not store calculation results'

 

Exit out of field definitions so it populates every record in your table with its results.  Then go back in and change it back to number.  You will notice that your calc remains in the calc dialog.

  • Author

oh man if this works I owe you a beer. Will try as soon as I get a chance to 

  • Author
  • Solution

Go to your field definitions on the UUID.  Change it to type calculation (BACK UP YOUR FILE FIRST).  Enter your calculation and be sure to set it to number result.  And it must be stored so in storage options be sure it is NOT checked 'do not store calculation results'

 

Exit out of field definitions so it populates every record in your table with its results.  Then go back in and change it back to number.  You will notice that your calc remains in the calc dialog.

 

 

Im not seeing where I can uncheck "do not store calculation results"

 

FMPro 12

When you make it a calculation, lower right says 'storage options'.  In there, be sure 'do not store calculation results' is unchecked.  :-)

  • Author

ah yes, thank you. it worked perfectly

 

now where do I send the beer?

Instead if you wish, you can donate to this forum which provides us all with such a wonderful resource. 

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.