Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I am slowly working on developing a DB for a business launching in the near future and struggling with a couple of seemingly simple scripts.

I have a Full Contact Management DB using the standard template but customised layouts/forms for business details, personal details, networkers details, sponsor networker details, charity gift club, executive business programme, alternative contacts, employees postion, empl personal, empl emergency, and activities. Each contact has info entered into each layout as appropriate.

I have a separate Networkers Contact Management DB and an Personnel Management DB. A long time back I managed to input trial info into the Personnel Management DB and using a script linked to a button was able to go to the Full Contact Management DB, create a new record and the Employee info based on an Empoyee ID# would insert it to the appropriate fields of the particular employee layouts. All I had to do was click to another layout and back into the employee layout and all the info was there.

Now for the life of me I cannot utilise this script with appropriate changes to copy a record from the Full Contact Management DB and insert it into the Networker Contact Management DB. I can script to open a new record in the Networker Contact Management DB and if I type in the Networker ID# which is the link in the relationship and tab to another field all of the info gets inserted quite nicely. I was trying to script to:

Open File ["Networker Contact Management"]

Perform Script ["New Networker Record" from file; "Networker Contact Management"]

Perform Script ["Insert NetworkerID" from file; "Full Contact Management"]

Refresh Window[]

This I had hoped would do it all as well as refresh the window or layout so one did not have to click out and back in again. I have tried many varying scenarios on this and really it is the inserting the Networker ID# that does not happen, if that did then all the info would appear I am sure.

So this is a real simple one I am sure but for me and after about 36 hours of reading threads, tutorials and manuals I am scripted into a loop of confusion. Your guidance please and very much appreciated.

Posted

Hi, Chris. I ran into something like this a couple of weeks ago and I believe I have the solution you're looking for. This is just one very simple way to do it. There are other ways to do it, but this method requires very little scripting.

You have two tables. "Full Contact" and "Networker". From the FullContact table, you want to copy a record into the Networker table. Create the serial number id fields (prohibit modication) in each table--these are the key fields that link up the data between the records. In the Networker table, add an additional field called FullContact_ID.

Next, you have define a relationship from the Networker table to the Full Contact table. Create a link from the FullContact_ID field in the Networker table to the Serial Number ID in the Full Contact table. This will allow information to be pulled from the Full Contact table to the Networker table and duplicated.

In the Networker table, you need to redefine all fields which you plan to copy information into. You need to redefine each field that you would like to autopopulate. Choose the option to Auto Enter data based on a Lookup from the relationship with the Full Contacts table. In the lookup options when re-defining your field, choose the identical field from the Full Contacts table and then click OK.

Now, create a script which copies the ID from the Full Contact table to the Networker table into the FullContact_ID field. All of your information will be duplicated into the Networker table without too much scripting. No fuss, muss.

This method DUPLICATES the data, which increases your file size. If people who access the Network database do not need to be able to change the data imported from the Full Contact table, or if you do not want to duplicate the information (in order to cut down on file size), simply place the RELATED fields on the layout and skip the Auto-Entry Lookup stuff.

I hope that helps.

Brian

Posted

To clarify my last post... When you are done setting up the relationship between the ID fields, there is ONLY field that your script needs to copy between the records. Make your script copy the ID field from the Full Contact table. Then create a new record in the Network table, and paste the field into the FullContact_ID field.

Let me know if you need any help.

Brian

Posted

It is better practice NEVER to use copy/paste. Use set field. You can set a global to the desired ID, create the record, set the ID field to the global value.

Posted

Using Script Parameter would also work since Chris is using vs. 7. It would depend upon his situation. Agreed ... not only does copy/paste mess with the clipboard but with the power of vs. 7, it's rarely needed.

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