Transfering data to new doc in different db

I was asked to work on some dbs after my (non tech) team found that I used to design notes dbs in v3. As is, I am very rustyand not fluent in scripting. I’m asking for guidance, I’m trying to build an action button from a doc to pull in 4 key field values and to populate into the new doc in another db. I picked up the values and set up a @prompt([ok]) to confirm this. I did a @command(compose) and was able to open the new doc but after that I’m lost. Don’t know how to push the values into the new fields. Any suggestions?

Subject: Transfering data to new doc in different db

Try this:

TmpComments := Comments;

@Command([Compose]);

@UpdateFormulaContext;

@SetField(“NewField”; TmpComments);

The first line sets a temporary variable (“TmpComments”) equal to the “Comments” field on the first document. You then compose the new document, and @UpdateFormulaContext updates which document you are working on in the UI (in this case, the new document). The last line sets the field “NewField” on the new document equal to “TmpComments”.

Let me know how that works.

Patrick

Subject: RE: Transfering data to new doc in different db

Patrick - Outstanding - it works!

Thanks for the help!!