Jump to content
Server Maintenance This Week. ×

Making script, copy fields from one table to another


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

Recommended Posts

  • Newbies

In my database I have a basic contact mangement in one table and an invoice in a related table. Currently I go to the invoice form and select my customers name from a drop down menu. How do I right a script that will copy the information from a field in the contact management, open a new Invoice and insert that information in the appropriate field? Any help would be appreciated.

Russ Douglass

Link to comment
Share on other sites

Russ,

There are a few different ways to skin-this-cat so be aware that this is not necessarily the best method but may be the easiest to explain.

I'm going to assume that both tables are in the same file.

Create a script called something like "New Invc From Contact". Have it do something like this:

Go To Layout (your invoice layout)

New record

Set Field [ContactID; Get (ScriptParameter)]

Now create a button on your contacts layout. Bind it to the script above. In the Optional Script Parameter box enter your ContactID field.

Now when you push the button your ContactID will be passed to the new invoice via a script parameter.

Please be aware that I'm going from memory here. I may have the syntax of things wrong and forgotten a step or two but this is the general idea.

Link to comment
Share on other sites

This topic is 6668 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.