November 20, 200619 yr I am having a little trouble with a script that looks for a related record and if it doesn't find one, creates one by netering a value into a related record. It works fine, except that if there is no record, it enters the serial value, but then doesn't update the record in time to show on the layout for the related record. The serial appears empty until the next time you run the script. I have even tried looping it round twice, but that doesn't work either. Its probably something really stupid that I just can't get my head around - any ideas out there for this one. Many thanks in advance for any hints, laughter or abuse. Tol If [ INVOICES::INVOICE number = "" ] Set Field [ INVOICES::INVOICE number; GetNextSerialValue ( "GROUPS" ; "INVOICES::INVOICE number" ) ] End If Go to Related Record [ From table: “PARTYguests”; Using layout: “PARTY Invoice” (PARTYguests) ] [ Show only related records; New window ] Commit Records/Requests Enter Preview Mode Show/Hide Status Area [ Show ]
Create an account or sign in to comment