NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: koen on May 18, 2011, 05:17:32 AM
-
In example 31 (Accounts): when a LineItem has been changed or a new record inserted, the LineItems Browse is refreshed, but the Invoices Browse is not refreshed automatically. I have to do that manually.
How can I make it automatically refresh the invoicebrowse after the LineItems file is changed? (i.e.not via a button).
Cheers,
Koen
-
Hi Koen
In the Invoice browse in the Inside Browse loop validate record embed call a source procedure
something like result = InvoiceTotal(InvoiceID)
In the source procedure loop through the records in the line item file restricted to the invoiceID and total any values applicable to the invoice.
I read the invoice record in the source procedure change the values based on the totals and then update the invoice
-
Hi Terryd,
The BrowseInvoices procedure returns a page with two browses. Between these two browses exists a parent – child relationship. The first browse is the invoice browse (parent), the second browse is the line-items browse (child).
When I update or insert into the child browse (line-items), this child-browse itself is refreshed, but the parent browse (Invoices) is not refreshed.
If the whole page is refreshed manually (in the InternetBrowser), then the first browse will also be refreshed and will show the new situation. So I thought the easiest solution was to refresh the whole page after the update either via a javascipt (window.location.reload) or by calling the BrowseInvoices procedure again. But unfortunately I cannot find the right embed to code this refresh.
Cheers,
Koen
-
Hallo Koen,
Do you use popup form to update the child?
Robert
-
Hi Robert,
Yes, I use a popup form.
Cheers,
Koen
-
Hi Koen
After you click the save button on an entry in the child browse the parent browse is refreshed (probably not the right word ) each of the lines displayed are validated so after clicking save each parent browse line is revalidated so that the source procedure will be called for each line displayed including the parent record of the child record added or amended
-
ok, then in the form on PostUpdate embed put name of parent browse and (p_web) at the end.
From accounts example:
BrowseInvoices(p_web)
It should work.
Robert
-
Hi Robert,
It indeed works.
Thanks.
Cheers,
Koen