September 29, 200421 yr 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
September 29, 200421 yr 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...
September 29, 200421 yr Author 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!
September 29, 200421 yr 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
September 29, 200421 yr 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...
Create an account or sign in to comment