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

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

Recommended Posts

Posted

I am a newbie to FM7. I have two databases and I need to be able to perform a script that copies/or sychronizes fields from on to another. (For Ex. db1 table 1 field 1 to db2 table 1 field 1.) Is there a script that can do this? Or, is there a relationship I can set to have the fields automatically be synched depending on what record I am at? Thx for any info...

db.zip

Posted

Synchronizing is quite difficult. Search back several months and you will find much discussion. Consensus seems to use a synchronizing product to accomplish with best accuracy.

Posted

Hmmm...OK thx for the info. I find it hard to beleive that a copy/paste script between two databases is not possible. This is really what I want to do. Syncronizing may have been the wrong term to use...

Posted

Frist you have to get the 2 databases to talk to each other. Under the file menu choose Define File References. Click on New and then Add File. Select the other file. Now you can add the other file to the relations graph. From here on you have many options.

Posted

Hi ctiger2, and Welcome to the Forum.

It isn't a matter of just doing a copy/paste if you are doing a true synchronization of two fields, synchronizing includes trying to figure out which field holds the correct data.

If all you are just trying to move data in one direction, as your response of Copy/Paste would indicate, then there are many ways to do this, script, export and import, calculations come to mind.

Why not tell us what you have now, and what you want to accomplish.

HTH

Lee

Posted

Hi Guys, thx for the responses. Synchronization is definitely not what I am after here. Basically, I have two databases. There are (X amount) of fields from database 1 that I would like to copy/paste into (X amount) of fields on database 2. Exactly like a Set Field [db1::field1; db2::field1]. I have attached a file for reference in my first post. I beleive I have all the relationships setup correctly. I just need to know what I am missing here script wise. Thx for your help.

Posted

Take a look at my changes. I added a new field to each database to show the flow of data. Created a script in db2 that will import the data in db1, sans new field, to show you how to create new records in the database. Another script that will replace the currently found set in db2 with the data in the new field in db1 based upon the relationship you had already created (which I renamed for clarity sake), to show you how to update a record in db2 with the data in db1.

Hope this gets you started!

Posted

Doug,

Thx for your response. I beleive you are on the right track. However, I do need to be able to copy/paste these fields without creating records in the second database... I will keep hacking away...

Posted

Does anyone else have experience writing a script to copy field(s) from one table and paste them into field(s) on a second table without creating records in the second table? Just a simple copy/paste script.... Setfield works within the same table but not between tables. I have attached my work in progrss. Not having any luck so far and becoming frustrated...

db.zip

Posted

Set Field indeed works between tables... as long as the records are related.

Alternatively, first move the field data into a global field, then access the global field from the other table and Set it into the proper field.

Posted

Vaughan...your suggestion for creating Global fields was indeed the perfect solution I was looking for. I thank you very much!

Posted

Hi all,

I am quite beginner too, I am creating a contact manager/invoicing/course registration database and there is a lot of data copying from one table to the other, like when I create a new invoice, register a contact or try to add a product/course in a invoice. I am trying to move data efficiently but the only script that work ok is using ???

go to layout invoice

newrecord

go to layout contactmanagment

copy field firstname

go to layou invoice

past firstname

go to layout contamanagment

copy lastname

goto invoice

past lastname

.....

Wich is quite long to write. This is quite basic, hopefully there is better solution since my script are getting really long. Also when I create an invoice I want to be able to add product automatically so I do about the same type of script but adding a

if field product1 =""

go to layout product

copy product

goto layout invoice

past product

.....

wich is even longer...

Any help would be greatly appreciated

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