GregLB Posted November 12, 2006 Posted November 12, 2006 Can someone help with the following please? I want to copy a postal address (5 fields) contents from one layout, "Contacts" to another layout "Projects" address(5 fields)in . Thanks Greg
Inky Phil Posted November 12, 2006 Posted November 12, 2006 Hi Greg Is the projects layout in the same table as the contacts layout? For that matter, is it in the same file? Phil (also in the NW of England - Brrr!)
GregLB Posted November 12, 2006 Author Posted November 12, 2006 Hi Phil No, I have a seperate tables for projects and contacts layouts but they are in the same file. Yes winters has arrived! Greg
Lee Smith Posted November 12, 2006 Posted November 12, 2006 It's not clear to me if these are different fields. Could you post the names of the field(s). Lee
Inky Phil Posted November 12, 2006 Posted November 12, 2006 I am going to have a stab at this cos I am leaving the office now. I don't know whether 8 supports variables so I am going with globals. Greg you can transfer data between tables by using globals so try the following Create 5 global fields On your contacts layout place a button and attach a script that does the following Setfield(Global1;contactfield1) Setfield(Global2;contactfield2) Setfield(Global3;contactfield3) Setfield(Global4;contactfield4) Setfield(Global5;contactfield5) Go to layout Projects (navigate to the record in projects that you want to set the value of or perhaps create a new record) Setfield(Projects1;GlobalField1) Setfield(Projects2;GlobalField2) Setfield(Projects3;GlobalField3) Setfield(Projects4;GlobalField4) Setfield(Projects5;GlobalField5) Thats it Greg - Easy peasy. You move it all into the globals, move across to where you want it and then tip it all out again - bit like a bucket really. If 8 supports script variables then you can use those instead of the global fields HTH Phil gone home now!
Lee Smith Posted November 12, 2006 Posted November 12, 2006 (edited) or, if the records are related though a Customer ID, you can use just the Set Field like this. Set Field [ Projects::Name; Contacts::Name ] Set Field [ Projects::StreetAdd; Contacts::StreetAdd ] Set Field [ Projects::City; Contacts::City ] Set Field [ Projects::State; Contacts::State ] Set Field [ Projects::Zip; Contacts::Zip ] HTH Lee Edited November 12, 2006 by Guest
GregLB Posted November 12, 2006 Author Posted November 12, 2006 Hello Lee yes they are diferent fields. e.g. "Contacts" layout with Table "contacts" with a field "postal address 1" and.... "Projects" layout with Table "projects" with a field "project address 1" The scenario would be that I have one contact and the address of the construction project may be their postal or home address. The scripted button would just automate the population of the project address in this scenario. I hope I explained that properly? Thanks Greg
Lee Smith Posted November 12, 2006 Posted November 12, 2006 I modified my my post above to what I feel you are asking. It sounds like you are creating duplication of data by doing this? Why not just create a relationship, and create the Project via the relationship? Lee
GregLB Posted November 12, 2006 Author Posted November 12, 2006 Hello Lee Thanks for your reply. I tried the option with the cusomer ID relationship but it dosnt seem to work? In reply to your last post: Im not sure that would work because sometimes the postal address is diferent to the work and sometimes it is the same. i.e. our client is construction company and their office address is the postal address. Then the project address is where installation is to take place. I hope that is clear? Thanks Greg
Recommended Posts
This topic is 6588 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