MsqedMan Posted September 29, 2004 Posted September 29, 2004 Hey all, I have a question about scripting a set field command. I have two tables, Companies and Contacts. I would like to create contacts from the Companies table. I am using a company# field to relate the records, but I can't get the script to insert the current company# in the contact layout. If I manually input the company# in the contact layout, the contacts show properly in the Company/Contact portal. Does this make sense. I am sure it's an easy fix, I am just stumped at the moment. thanks for any help, Tony
Deep Thought II Posted September 29, 2004 Posted September 29, 2004 dont use script to do this. have a field "Company #" in both table, and relate it. allow creation on the contact table via the relationship. use a layout based on company, create the contact portal, and there is no need to put the Company # field in the portal. it's auto-entered for every portal row u enter...
MsqedMan Posted September 29, 2004 Author Posted September 29, 2004 OK, to go a bit further... that solution works, but there are more fields in contacts that need to be filled out that don't show up in the portal. If I create a new contact through the portal, I still need to go to the contact layout and add the rest of the information. Does that make sense? thanks for the portal hint! at least I can sleep knowing that part works!
Wim Decorte Posted September 29, 2004 Posted September 29, 2004 To script it: - start the script in the company file and store the the company# in a global (or give it to the script as a script parameter in 7) - from that script run a script in the contacts file that - creates a new record - sets the company# field to the content of the global or the script parameter - show the contacts file layout where the user can input more data HTH Wim
Deep Thought II Posted September 29, 2004 Posted September 29, 2004 another option: u can add a small button at the end of portal row, that opens a new window which shows that contact's detail information in the contact layout. use script step, go to related records, show related record only, in new window. then use a little script to adjust the window to the right size and position... i normally write a generic script that will adjust window size and put it in the middle of the screen so u can use it anywhere when u open a new window. what the above will look like is that as u are in the company layout, seeing a portal listing contacts, and at the end of each portal row there is an icon button. clicking the icon button opens a new window showing that contact's detail information in the contact layout. the user can then close the window anytime and return to the company layout...
Recommended Posts
This topic is 7622 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