Jump to content

Create many records in a Portal with a script??

This topic is 6535 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 post
Share on other sites
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 post
Share on other sites

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.