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.

Create a new record in a different file?

Featured Replies

I have a file that contains data on all employees and volunteers. I have a second file that is related through the field "ID No." (this number is established each time a new record is created in file number one). What I need is a script in file number one that will copy the ID No. and then open file number two and paste the ID No. into a new record there. Can anyone tell mne how to do this?

Thanks,

confused.gif

Avoid Copy/Paste.

Use a global and a constant relationship from a File 1 to File 2.

In file A, create a field called gHook, set to be a global number field.Define this field to be =1

In the second file, create a field called cHook (stored calculation = 1).

Create a relationship from File 1 to File 2 (call it Constant)

Create a global field called g_ID (same format that your ID) in File 1

Then the script in File 1 should be.

Browse Mode

Set field g_ID (=IDN

  • Author

Thanks, Ugo - works perfectly! smile.gif

  • 6 months later...

Hi, I have same problem. Just want to get several things clear.

1. The constant relationship will be defined in 1st file, right? with gHook on the left and cHook on the right?

Then How can you using this relationship in the 2nd file when you define the "Set ID" script?

2. I want put a button in 1st file to trigger the script. but what if the user click the button by mistake? then there will be an empty record(only has ID #) in 2nd file, right?

I must miss something here. What's the trick?

Thank in advance!

I think Ugo is on holiday so I'll try to answer this one...

>>1. The constant relationship will be defined in 1st file, right? with gHook on the left and cHook on the right?

>>Then How can you using this relationship in the 2nd file when you define the "Set ID" script?

Actually the relation does not have to be valid if you only want to use a global field from another file.

So you can just define a relation from file 2 to file 1 using gHook and cHook, or define g_ID in file 2 in stead of file 1

The second problem could be tackled by starting the script in file 1 with

Show message "Are you sure you want to create a new record?"

If Status(CurrentMessageChoice = 2)

exit script

end if

Hope this helps.

Ernst.

Thanks very much, Ernst. and sorry for my late reply.

So there is no other more controlable way to handle the 2nd problem? I don't want use portal b/c the user doesn't like the whole screen blackout.

Presumably you will want more data in the related file than just the ID - otherwise there's not much point in having the record.

I use a tachniwue to validate by script all the required fields. Try this and if the user cancels the routine then delete the record just created before you return to the main script in the master file.

Thanks Mark.

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.