Newbies justinltaylor Posted September 10, 2012 Newbies Posted September 10, 2012 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
No_access Posted September 10, 2012 Posted September 10, 2012 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.
LaRetta Posted September 10, 2012 Posted September 10, 2012 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! :-) 1
Newbies justinltaylor Posted September 10, 2012 Author Newbies Posted September 10, 2012 Thanks very much for the welcome and for the help. I have another problem that we can tackle some other time.
Recommended Posts
This topic is 4803 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 accountSign in
Already have an account? Sign in here.
Sign In Now