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.

Copying from one file to another

Featured Replies

I have two files - one for players and the other for history (stats etc). I want to create a new record in the History when a new player is created in the player file. I'm not using a portal and don't want to. All I want is to copy the new name and the player ID into the History file.

Should be easy but I can't manage it. I thought I could just copy it to the clipboard and it would paste in.

Any ideas ?

I have a design that requires that data move routinely from one database to another. I have found that writing a script to import your players data into the "history" database can work very nicely. Make sure that you utilize a unique "matching field" in the import so you don't end up with a bunch of useless duplicate information.

Making a relationship based upon each player after that to calculate averages and such should be cake after that.

  • Author

I'm sorry, but I don't fully understand your answer. Do I do a find (in a script) that isolates the new record and just import that one record from the player file, adding it to the records that are already there ?

Sorry to sound a bit thick !

Thanks

Grant, one of the most common ways to pass data between files is with a constant link. In each file create a caculated field that returns a number and give it a value of "1". Give your field a distinctive name like Constant or something that works for you. Create a relationship between the two files using the Constant fields. Make it a basic relationship, Do Not enable the options for deleting of related records or for creation of related records. Now you can use global fields in each DB to pass info between files. For instance in your problem, first create in the history file two global fields, one to hold the ID and another for the name. Then when your new record in players is created use a script to pass the info to the history DB using the constant relationship. Then when the script creates a new record in the history file use the Set Field command to set the ID and Name fields with the data from the globals.

New Record/Request

SetField "ID", "global_ID")

SetField "Name", "global_Name")

Hope that was clear enough to help.

  • Author

geodd , thanks for that answer - it works beautifully. The only trouble I had was to copy the new file I had created. It always just took the first. I have a solution, but it probably could be better.

Thanks again !

  • Newbies

quote:

Originally posted by grant:

I have two files - one for players and the other for history (stats etc). I want to create a new record in the History when a new player is created in the player file. I'm not using a portal and don't want to. All I want is to copy the new name and the player ID into the History file.

Should be easy but I can't manage it. I thought I could just copy it to the clipboard and it would paste in.

Any ideas ?

Create 2 global fields into the the History file. "Name" and "ID".

Create a first script in the player file which will define these two fields with these two informations.

Create a second script which will start at the end of the previous one and will create a new record in the History file and will define the two text) (text) fields Name & ID with the values from the global.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.