NetTalk Central

Author Topic: How to skip net refresh  (Read 2565 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
How to skip net refresh
« on: May 22, 2019, 01:16:23 AM »
Hi Bruce

This is a followup on my subject:"NTWS - NETREFRESH - GROUPING UPDATES"
My question is how do I prevent a browse to update from a NetRefresh. Anywhere to insert some code that, if a flag (host value) is set, the browse does'nt refresh.

Regards Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: How to skip net refresh
« Reply #1 on: May 22, 2019, 06:57:15 AM »
It gets complicated because the refresh is done from the client side.
In other words;
a) Table changes - sends NetRefresh.Send
b) This changes a session value that the browser is "watching".
c) the browse sees the table change and so does a refresh
d) this comes into the server as a normal "refresh" command.

I have tweaked it a bit so it passes in a parameter you can detect, and hence then alter the reply if you like. The Value name is _netRefresh_ and you can access it with SetValue
 if p_web.GetValue('_netRefresh_') = 1
   ...
 end

You'd want to follow the code through the TakeEvent routine to see how it flows when a refresh event comes in...

cheers
Bruce
« Last Edit: May 22, 2019, 11:07:08 PM by Bruce »

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 419
    • View Profile
    • Email
Re: How to skip net refresh
« Reply #2 on: May 22, 2019, 10:14:16 PM »
Hi Bruce

Thanks for the feedback.
That's exactly what I need!

I suppose you mean "GetValue", otherwise there's something I don't understand ...
Is this tweak included in 11.11?

Regards Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11158
    • View Profile
Re: How to skip net refresh
« Reply #3 on: May 22, 2019, 11:07:39 PM »
>> I suppose you mean "GetValue", otherwise there's something I don't understand ...

I do - post edited to reflect this.

>> Is this tweak included in 11.11?

yes.

cheers
Bruce