NetTalk Central

Author Topic: NetWebForm: Procedure Field, Server Side Code not Executing  (Read 2156 times)

BradT

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
NetWebForm: Procedure Field, Server Side Code not Executing
« on: October 20, 2020, 02:02:51 PM »
I have a NetWebForm
A Tab on the form has a Procedure Field which is a NetWebBrowse
When the user does anything to a record in the NetWebBrowse I need code to run after they exit the NetWebBrowse and come back to the NetWebForm.
I have always put the code in the Validate::FIELDNAME Routine, which you can get to on the template in the Client-Side tab.
I have other NewWebForms where this is working but this one it is not.

Any ideas?

NT 11.44

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: NetWebForm: Procedure Field, Server Side Code not Executing
« Reply #1 on: October 21, 2020, 04:23:57 AM »
Hi Brad,

>> A Tab on the form has a Procedure Field which is a NetWebBrowse

ok.

>> I need code to run after they exit the NetWebBrowse and come back to the NetWebForm.

I'm not following you here. What do you mean by "exit" the browse and "come back" the form?
I mean - the form is always open right - the browse is always there right? So what does "exit" mean in this context?

Perhaps this is a good question for the webinar tomorrow, where you can show me what you are doing.

cheers
Bruce

BradT

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: NetWebForm: Procedure Field, Server Side Code not Executing
« Reply #2 on: October 21, 2020, 08:59:04 AM »
Bruce,

A NetWebForm contains a tab which contains a Procedure field that is a NetWebBrowse.
The user can Insert/Change/Delete records in the NetWebBrowse, like detail lines on an order.
When a record is Inserted/Changed/Deleted in the NetWebBrowse, and focus comes back to the NetWebForm, I need some code to run.
I have always put the code in the embed I outlined in the original question, Validate::FIELDNAME.
This time it is not running.  I have tried the GotFocusBack Routine and several others.

I couldn't make the webinar today.

Brad

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11179
    • View Profile
Re: NetWebForm: Procedure Field, Server Side Code not Executing
« Reply #3 on: October 21, 2020, 10:16:38 PM »
Hi Brad,

ahh- it's making more sense here. So you're wanting to do something when the _(browse)form_ closes, not when the _browse_ closes.

So in that case yes, I expect Gainfocus in the parent form would be the place I would look next.

the webinar is today (Thursday) not yesterday, so hopefully you can make it today.

Bruce

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: NetWebForm: Procedure Field, Server Side Code not Executing
« Reply #4 on: October 22, 2020, 02:22:17 AM »
Hello Brad,

What has helped me in these situations is to use the browser's developer tools to inspect the requests as each browse and form opens and closes.

Each request has a wealth of information particularly the URL data in each request.  Each data parameter can be accessed/tested in a browse or form with p_web.GetValue('somedata').

Once you understand what the browse or form is expecting to receive, you'll understand what you need to do to get the browse or form to do what you want.

For eample, a browse behaves in one way if a form is cancelled versus if the form was saved. 

There are ways to force a browse refresh when the browse/form gains focus.

As soon as I get to my development machine, I'll see if I can dig up some examples.

See ya,

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

BradT

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • Email
Re: NetWebForm: Procedure Field, Server Side Code not Executing
« Reply #5 on: October 22, 2020, 08:27:16 AM »
Thanks Guys.

Don,

Yes, I use that as well.  I am not getting any activity on the parent form for some reason when the Browse Form is closed.

Unfortunately I couldn't make today's webinar either.

Brad