NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: charl99 on December 10, 2012, 02:09:45 AM
-
Hi,
I have a similar Parent Browse -> Child Browse as per Invoices Browse in the above example.
When I update the Line Items Browse, I would like to update the Invoices Browse (the Total) as well. This does not happen in the example, unless I press the Invoices Menu Item again (or indeed refresh in the browser in my case). I have 'Other' Buttons on the Child Browse though.
I have tried this:
! End of "After Validate New Value"
Loc:Eip = 0
do CallBrowse
! Start of "After Data Refreshed"
! [Priority 5000]
p_web.setValue('_ParentProc','') ! Next 3 lines my Code which I saw in the web31 example, but this does not work
p_web.DeleteValue('_EIPClm')
WBrowseNewSections(p_web)
! End of "After Data Refreshed"
Please, how can I do this?
Thanks
Charl
-
Hi Charl,
>> This does not happen in the example
that's an interesting starting point, because in my test here, with that example, if I change something in the child, that changes the total, then the change is reflected in the parent.
As you noted in your post, the change is caused by the 3 lines;
p_web.setValue('_ParentProc_','')
p_web.DeleteValue('_EIPClm_')
BrowseInvoices(p_web)
which are in the Validate::LIN:Quantity and Validate::LIN:Price routines.
cheers
Bruce
-
Bruce, Yep, interesting indeed.
Silly me did not notice the 'Paid' thing in the Invoices Browse, which means I could not do the EIP on the 1st Invoice, so I tried Change Line Item...
Please let me rephrase then:
I am calling a Pop-Up Memory Form from my equivalent of a row in the 'Line Items', which either (a) Change the Row, or (b) Add a New Row.
For (a) Change a Row - I Refresh in the Line Items the Browse Row Data and
for (b) Add a New Row, I Refresh the whole Line Items Browse.
I guess I cannot figure out the right p_web.DeleteValue('_EIPClm_') to use, it kind of looks wrong, I saw a _Pop-Up_ thing in the code.
I cannot figure out the right routine to place the code.
Thanks
Charl
-
I think you will need to tweak an example and post here to show what you are doing Charl.
cheers
Bruce
-
Bruce, sure, NOT always easy to tweak an example by the way!
Anyway, Account example 31 tweaked. Note:
1. Added Total field to Invoice.tps and don't do calculation in Invoices Browse, file field now.
2. Added 2 Buttons to Line Items Browse -> that goes to a Memory Form
3. One Edit button, that refreshes Browse Row, Other Insert Button that refreshes whole Browse
4. When I do something here, and Save changes, I update Invoices file total
Nevermind what I've tried, I cannot find the right place to put embed code to update the Invoices Browse (so I did not even try with the example). So I guess, if you can please add the 6 lines of code at the right place I will probably be able to go away for Christmas.
Thanks a million
Charl
[attachment deleted by admin]
-
Hi Bruce,
Good thing I postponed my 5 days holiday for 4 days.
Any news on this?
Thanks
Charl
-
Hi Charl,
I think you posted the wrong app. The attached app did not have;
>> 2. Added 2 Buttons to Line Items Browse -> that goes to a Memory Form
also no code for
>> 4. When I do something here, and Save changes, I update Invoices file total
so I think you need to repost.
cheers
Bruce
-
Bruce,
Yes, sorry for wasting time, that was the old habit of just going to the CapeSoft folder in Clarion 8. ???
Anyway, I made sure this time!
Thanks
Charl
[attachment deleted by admin]
-
In the ValidateRecord routine,
after your embed code, add
p_web.setValue('_ParentProc_','')
p_web.DeleteValue('_EIPClm_')
BrowseInvoices(p_web)
Cheers
Bruce
-
Bruce,
You are BRILLIANT!
Danke Schoen
Charl