Terrible Toll Posted November 20, 2006 Posted November 20, 2006 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 ]
Stuart Taylor Posted November 21, 2006 Posted November 21, 2006 Have you tried the refresh window script step?
Oldfogey Posted November 21, 2006 Posted November 21, 2006 I think you need another 'Commit record' in front of the 'End If'.
Terrible Toll Posted June 5, 2007 Author Posted June 5, 2007 That could be it - just the sequence of events. thanks for the replies.
Recommended Posts
This topic is 6730 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 accountSign in
Already have an account? Sign in here.
Sign In Now