NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: broche on April 19, 2019, 01:56:17 AM

Title: Form not saving fields
Post by: broche on April 19, 2019, 01:56:17 AM
Cl 11
NT 11.07

Regular form coming from a browse
On Update I do some calculations within the form and the correct numnbers are generated and the fields refreshed.  See the image.
When I save the the form the two calculated fields revert to zero?  Using debugview++ I have checked the fields and they all look correct.  Looked at ValidateRecord in case there was something going on there but there is not.

Looks like saomething is happening after I click the Save button but I have no ideas what?

Brian.
Title: Re: Form not saving fields
Post by: Robert Iliuta on April 19, 2019, 02:25:42 AM
Hallo Brian!

After calculated fields did you put the results on sessions?

Example:
TBL:LinesPaid =  TBL:Tax+100
p_web.SSV('TBL:LinesPaid',TBL:LinesPaid)

To understand how it works, see the source code on validate.

Robert
Title: Re: Form not saving fields
Post by: broche on April 19, 2019, 06:41:20 AM
Thanks Robert,

Here is what I did

Loc:LinesPaid = Billing.PayLines(pChrs,pChrsPerLine)
p_web.SSV('CVF:LinesPaid',Loc:LinesPaid)

Billing is a little class I wrote to learn, it just returns lines paid.

Brian.
Title: Re: Form not saving fields
Post by: DonRidley on April 21, 2019, 02:07:39 AM
You probably need to do a refresh on the calculated field to display the new value.

Loc:LinesPaid = Billing.PayLines(pChrs,pChrsPerLine)
p_web.SSV('CVF:LinesPaid',Loc:LinesPaid)
Do Refresh::CVF:LinesPaid
Title: Re: Form not saving fields
Post by: Bruce on April 23, 2019, 06:31:31 AM
what are the field names on the form?
ie - what fields are you using on the form for the two calculated fields?
Title: Re: Form not saving fields
Post by: broche on April 24, 2019, 06:59:37 AM
That was it Bruce, I was getting too fancy using Local fields.
When I called the class that I was using and used the form fields then used SSV - All worked fine.

Thanks all.