Jump to content

This topic is 4526 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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

Posted

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.

Posted

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!

:-)

  • Like 1

This topic is 4526 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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