On regards on my previous post on ""Creating a document from Database A to Database B""

Hi… i have some problems after manage to throw the information to the database B. But there is this little problems… okie… i shall put my previous post to make everything clearer.

<<I have this Database A, when a btn is click. A document in Database B will be created. and some fields in the Database A will need to show in the document in Database B…

Anyone has a sample code that do something like this…

Basically i just need to export the information from Database A to Database B… but i not sure how to go about doing it… >>

okie… i manage to get help with the solution from Bern and Jason…

NOW… in the DB B… i have 2 form. but then the field bring over shows in the wrong form… how do i go about to target the correct form to display the information? Pls advise with a solution. Thank you :slight_smile:

truly appreciate your help :slight_smile:

Subject: on regards on my previous post on ““Creating a document from Database A to Database B””

Whatever is inside the Form field will be used to pick which form will be opened when you are displaying a document.

So, if you simply copied all the fields into your target database, and didn’t change the Form field to reflect the new form, then it might not open properly.

Simple assign your target form name inside the form field:

FIELD Form := “MyNewForm”

(in formula) or

doc.Form = “MyNewForm”

(in script)

and voila.

hth

Nicolas Abesdris

Subject: on regards on my previous post on ““Creating a document from Database A to Database B””

Hi Yong,

Take a look at the code you have written previously, Just alter the line where you will set the target document form(document in database B).

You would have set the target document somewhere in the code. for e.g

docB=databaseD.CreateDocument

Now give the following code :

docB.Form=“target form name”

the form name in which you wish to display the document.

Now the document will be displayed using the specified form.

Hope that helps,

Jason.