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

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

Recommended Posts

Posted (edited)

Newbie Question:

I want to create a new record in a related database and populate its fields with some of the values from the current record displayed. How do I do this, if it's even possible?

The ScriptMaker seems very basic.

Thanks

Graham

Edited by Guest
Posted (edited)

You surely can do it plus other wonderful things using FM scriptmaker. The power of scripmaker rests on the user.

To cut a long story short...From your current screen, create a button with the following:

Go to layout [yourrelateddatabase]

New Recdord []

Set field [foreignKeyID;get (scriptparameter)]

Set field [some other...]

Go to layout [originallayout]

Make sure your button scripparameter is set to the current records primary key ID.

In your related database you can have the field lookup using the forein key and they will populate as soon as the "Set field [foreignKeyID;get (scriptparameter)]"

Hope this helps

Edited by Guest
Posted

I just can't seem to get the exact syntax of the 'Go To Layout' correct. It never switches to the other database.

If my other db name is "Nursery Products" and it contains a table called "Plant Catalog" and a lyout called "Form View", exactly what should I put as the parameter to the 'Go To Layout' function.

Many Thanks.

Posted

Go to Layout will only go to layouts defined in the current file. If you need to go to a layout in another file then you need to make a go to layout script in the other file and call that script from the current file.

Posted

Earlier you said that the table in the other file is related.

If so, you can create a layout for it in the current file.

Either way, you can create records in related tables directly - if the relationship is defined to allow creation of records.

Posted

Let's go back to your original post. You say that you want to create a new record in a related database and populate its fields with values from the existing record. Does this mean that you are trying to create a new record related to the current record? If that is the case then a portal into your related file is probably the answer to your problem. In fact the fields that you wish to duplicate can be made into match fields and they will be automatically duplicated whenever you enter data into a non-match field in a empty portal row,

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