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.

To log a record on table2

Featured Replies

Hello ALL:

Q: How to write the script on FM pro7 to log a record from TABLE1 to TABLE2 w/ a new record_ID.

OK, here is my case:

====================

I have a FM pro7 file called

DoorAccess Management which has two table:

DoorAcces and DoorAccessLog.

Both Table has ID, Key#, AccessLevel, Employee.

Once the Door key was assignned to other Employee, I will like to log the old record w/ old employee name to DoorAccessLog table. How to do so? Thank you for help.

Import the record betwen tables.

  • Author

Hello there:

Yes, I am using the import function. but the script seems has problem. The script is logging all the record(s). Well, all I need to do is logging the current openning record.

OK, here is the content of the script.

Go to Layout ["Form View - Log" (DoorAccess Management)]

Import Records [No dialog; "DoorAccess Management.fp7"; Add; Windows ANSI]

So, where can I assign it to import the current reord? (The only one record to import.)

Hi Charlih,

To import only one record, you must first isolate it in DoorAccess (from all the other records). Imports always pull an entire record set so you need a found set of ONE. Then when you go to your Form (in DoorAccess Log) and perform your import, only the one record will import.

Envision this please and see if it might work for you - script activates on DoorAccess form which 'moves' the old Employee to the Log as follows:

Freeze Window

Loop

Show All Records

Omit Record

Show Omitted Only

Exit Loop If [ Get(FoundCount) = 1 ]

End Loop

Go To Layout [ "Form View - Log" (DoorAccess Log) ]

Import Records [ No Dialog ; "DoorAccess Management.fp7" ; Add ; Windows ANSI ]

Show All Records

Go To Layout [ original layout ]

Show All Records

This will leave you back on your DoorAccess layout on the same record. You can then finish your script by changing it to the new Employee. Your SOURCE would be DoorAccess (after you specify DoorAccess Management.fp7) and your DESTINATION will be your DoorAccess Log table. The loop is to protect in case of multi-user solution. :wink2:

UPDATE: Oh ... I REALLY tried to let it go but there are probably easier ways to move/create only one record other than import and I feel obligated to mention it. But since I didn't know your structure, and since you seemed already 'in to' the import idea, I didn't want to write volumes (smile) or add confusion to the mix. You already KNOW how to do the import and it should work for you just fine.

LaRetta

Edited by Guest
Added Update

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.