Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted (edited)

Hi

I want to copy contents of a postal address field in one table layout "Contacts" to another table layout "Projects" address field.

As a time saver I want to be able to script a button to copy the postal address contents. If the postal address of the client happens to be the same location of the construction project, although this isn’t always the case and then the project address would be entered manually.

I have...

"Contacts" layout with Table "contacts" with say a field "postal address 1"

and....

"Projects" layout with Table "projects" with say a field "project address 1"

The Contacts & Projects tables are related by:

Contact ID to Project IDfk

And I tried this script but it doesn’t work?

Set Field [ Projects::StreetAdd; Contacts::StreetAdd ]

and so on for the other fields

I hope I explained that properly?

Thanks

Greg

Edited by Guest
Posted

Does Projects have an existing record?

If not you might consider entering define database, double clicking the relationship between your two Table Occurances and clicking allow creation of records on the Project side.

Alternatively, just write a simple script to manually do it e.g.

Set Error Capture[On]

Allow User Abort[Off]

Freeze Window

Set Variable[$ID ; Contacts::Contact ID]

Set Variable[$address ; Contacts::Postal Address 1]

..

..

..

Go To Layout[ YourProjectLayout ]

Create New Record / Request

Set Field[ Projects::Project IDfk ; $ID ]

Set Field[ Projects::Project Address 1 ; $address ]

..

..

..

Go To Layout[ Original Layout]

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