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.

Scripting to copy fields between tables

Featured Replies

  • Newbies

I have a database with 3 tables.

Customers, Service Calls, and Service ques.

This question is about making a button that will move all of the customer information from the customer being viewed on the customer table, into a new record on the service table. So for example, if company A calls in with a broken machine i want to look them up on the customer table and then click a button that will go to the service calls layout, create a new record for this service call, and paste all of the relavant customer information into the fields so that each customers service call gets a new line that i can have a line for each service call.

thanks,

Justin

In a script .

1) Set each item you want to copy as a variable

2) make a new window

3) go to layout

4) new record

5) Set each field to the corresponding variable

Done.

Hi Justin,

No need to copy all Customer info into Service Calls - only copy the Customer unique ID. Since the tables are (or should be) related, the Customer data can simply be placed on your Service Calls layout. Some Customer info may be copied if needed for audit/history purposes.

So pseudo-script might look like this firing from Customer layout:

Set Variable [ $ID ; Customers::CustomerID ]

Go To Layout [ Service calls ]

New Record

Set Field [ Service Calls::CustomerID ; $ID ]

Commit

... set any other fields directly such as...

Set Field [ Service Calls::Address ; Customers::Address ]

... then either stay on this layout or return depending upon your need. You need relationship as:

Customers::CustomerID = Service Calls::CustomerID

Oh, and welcome to FMForums!

:-)

  • Author
  • Newbies

Thanks very much for the welcome and for the help.

I have another problem that we can tackle some other time.

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.