Jump to content

Create many records in a Portal with a script??

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

Recommended Posts

I posted this message in the Portal Forum, but must be stay in this forum.



Hi every body...

Maybe this question is so easy, but please I need your help.

Ok, How can I create many fields in a portal from a payment field, with just a click?

For example:

In my DB I have a option to create the payments, in this layout I have a field (num_payment) in this field the user indicates the payments for a patient (i.e. 10), ok, how can I create the 10 records in the portal just with a click (I think this should be a script), but in this Portal I have a date field, how can I make the 10 records with a month of difference between them.

I hope you can understand my English.


Link to comment
Share on other sites

It's complicated, but not hard.

First create a relationship between the master and related fiels that relates all records between both files (I make a calc field = 1 in both files and use this as the key).

Second, in the master file make a global field to hold the key of the current record. You'll also need a global field for the number of records to be made and the values to beentered.

You need two scripts, one in the master file, one in the related db.

The script in the master file sets the global key field and the values for the other global fields (number of records etc). It then externally calles the script in the related file...

The script in the related file creates a new record, sets the remote key to the appropriate master key value (through the "match all" relationship) and sets whatever values are required (also through the "match all" relationship). This script can be looped through to create the desired nuber of related records.

The process ends with a "Refresh Window [bring to front]" step following the "Perform Script [external]" to bring the master db forward again.

Link to comment
Share on other sites

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