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

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

Recommended Posts

Posted

I a trying to write a script that will simply create a new record in a portal.

The portal is a payment database that records payments made by date, type, and amount.

To save time keying, I want to use buttons that say 'cash payment', the script would create a new record in the portal row, then add the date, the type, and simply ask the user to enter the amount.

Thanks

Posted

Mark,

make sure your relationship for the portal is set to allow creation of related records.

In your related database, set the date field to auto enter the creation date.

If your relationship is called paymentsid

you can write the folowing script.

go to field [paymentsid::date]

go to portal row [last]

set field [paymentsid::type] "Cash"

go to field [paymentsid::amount]

What this does is.

First it goes to a field visible in your portal (eg date)

Then it goes to the last portal row, which is the first empty row.

Then it adds the type as cash and then goes to the field amount, waiting for the user to enter the amount.

Because the date is set to creation date, that is entered automatically

HTH

Posted

If you have a child file where your payments are stored, then you can get your new payment to be at the top of the portal int he parent by:

. having a script which performs an external script in the child file to create a new record and date/time stamp it, then returns to the parent file.

. have your portal sorted by decreasing order of date, then time.

Now, your portal wil show the new payment at the top, ready for entry, and all other payments in descending date/time order.

Russ Baker

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