NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: MyBrainIsFull on January 12, 2015, 05:39:06 PM
-
Hi all, I have a problem refreshing a parent child browse similar to Net Talk Example "Books", where the invoice parent shows the invoice $total - and the child line items are totaled - so that the $total line items should be the invoice total. See image below.
When the page opens, its ok, but if you change a child Qty, only the child total updates, I dont see how to refresh the parent browse, the template only allows you to refresh the child browse. But I would like to refresh the parent line item, like you can do with the child where there is an option to update just that current line. Or failing that, refresh the whole parent browse.
To reproduce - refer to the image
change a line item qty like "Send to" From qty=2 to qty=1
the child total drops to $208, but the parent remains at the previous value of $357
[attachment deleted by admin]
-
On the parent browse (BrowseInvoices in this example)
Go to the Children Tab.
There you see the child - BrowseLineItems
Open the properties for that.
Set "On Child Updated" to "Refresh Row".
(If the parent browse also has a toal then set it to "Refresh Whole Browse".)
now come on - give me something a bit more challenging :)
cheers
Bruce
-
Y' mean like Africa winning the cricket sometime ?
< grin >
-
I was working on the child browse as that is where the user changes the qty purchased
I tried the following to make the parent update - any reason why it didnt ?
This is the validate of the Order Line when the Qty Ordered changes.
Validate::OrdLn:QtyOrdered Routine
p_web.PushEvent('parentupdated')
do AlertChildren ! propogate event down
p_web.PopEvent()
p_web.PushEvent('childupdated')
do AlertParent ! propogate event up
p_web.PopEvent()
I was expecting this to push the event to make the parent update
-
Your help works great - Thanks
If you like, I can fix your Invoice app that has the same bug in it so you can include that in NT 8.34 examples.
Thats what a nice guy I am
K