March 17, 200223 yr 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
March 17, 200223 yr 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
March 17, 200223 yr 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
Create an account or sign in to comment