NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: broche on August 04, 2014, 03:21:14 PM

Title: Application Gone MAd - Continuation
Post by: broche on August 04, 2014, 03:21:14 PM
Sorry can't add to the last topic?

Looks like those who are having problems with the filters are logging in and being rejected the first time but not the second login.
I have a log that records who logged in and when and it seems pretty consistent.

Brian
Title: Re: Application Gone MAd - Continuation
Post by: broche on August 04, 2014, 03:23:56 PM
I get this on debugview on the server

[185244] [st] [netTalk][thread=4] brwMTAssFix :: Filter: CVF:AssignedTo=15 AND cvf:status='ASSIGNED'
[185244] [st] [netTalk][thread=4] Error [-1:2] opening file: C:\WebPortal\web\brwmtassfix_brwmttransdetails_value

not sure what the second line means?

In this example the filter is picked up and works.
Title: Re: Application Gone MAd - Continuation
Post by: kevin plummer on August 04, 2014, 04:03:29 PM
Hi Brian,

my guess is when it fails it probably looks something like this CVF:AssignedTo=0 AND cvf:status='ASSIGNED' or CVF:AssignedTo= AND cvf:status='ASSIGNED'

if it does then the session value for your login required for the filter CVF:AssignedTo is being cleared somewhere.

I would add your filter to source code something like this

if p_web.gsv('loginid') = 0 or p_web.gsv('loginid') = ''
  wasfilter = '1=3'
  !addin some debug code so you know you still have probs
else
  wasfilter = 'CVF:AssignedTo=' & p_web.gsv('loginid') & ' AND cvf:status=<39>ASSIGNED<39>'
end
Title: Re: Application Gone MAd - Continuation
Post by: broche on August 04, 2014, 06:38:27 PM
What embed do I use to put that code in please.
Title: Re: Application Gone MAd - Continuation
Post by: kevin plummer on August 04, 2014, 08:13:43 PM
just put in something like AAAAA as the template filter and then search for that in code and use the previous available embed. Then remove the AAAAA from the template filter. Check the variable that holds the filter in the source as my example was pseudo only.
Title: Re: Application Gone MAd - Continuation
Post by: broche on August 04, 2014, 08:28:11 PM
OK - I got them thanks
Also writing some code to get the ID's I need for the filter and it seems to be working.  This can be a work around till I resolve the real issue.

Brian.
Title: Re: Application Gone MAd - Continuation
Post by: Stu on August 04, 2014, 09:23:21 PM
Hey Brian,

Sounds like you have this already, but I'd second the process of putting your filters into an embed, even just until you work out what is going on.

Here's what I use for filters (pictures).

1. Is the embed place.

2. Is the code, with a Debug() call (which writes to DebugView). If the filter is complex, I'll often have
Code: [Select]
&choose(loc:FilterWas='','',' and '&clip(loc:FilterWas)) at the end of each loc:FilterWas = 'some filter' line.

[attachment deleted by admin]
Title: Re: Application Gone MAd - Continuation
Post by: broche on August 04, 2014, 09:46:09 PM
Thanks Stu,

I hard coded all the filters in the app - can't think straight now :)
This seems to be working for now.  What I did was look up the Staff ID again using the login and password which I save on login
Then reset the errant session variables then applied the filter.

Brian
Title: Re: Application Gone MAd - Continuation
Post by: Stu on August 04, 2014, 10:32:20 PM
Good to hear Brian.
Title: Re: Application Gone MAd - Continuation
Post by: broche on August 05, 2014, 07:28:40 AM
App is still behaving eratically for users.
When I login to the remote server it all seems to be running just fine.
However when some users login they fail the first time then successfully login and then see nothing in the tables.
So I think it is even losing the Session Variables for the login and password.

Has something nettalk login code, I remember something a while back on an upgrade where we had to do something?

Grabbing at straws I'm afraid.
Title: Re: Application Gone MAd - Continuation
Post by: rjolda on August 05, 2014, 10:19:45 AM
Brian,
What I did when I started playing with this stuff long ago was use a local variable ( e.g. myfilter - string(250) ) for constructing the filter.
I would do this ONLY ON MY DEVELOPMENT MACHINE - as message will pop up a message box on the web server ( development machine ).
I would code in a line for myfilter before the filter was called for the browse - e.g.
 myfilter = GSV(logid) & 'active=1' ( not correct syntax for Net Talk but simply for illustration)
 message('My Filter: ' & myfilter)


The message would pop up on the development machine and will wait for an OK before the browser will continue.  This way you can actively see what values you have in your filter and what you are getting and not getting. 

When done, delete the message('') line -
FWIW,
Ron
Title: Re: Application Gone MAd - Continuation
Post by: broche on August 05, 2014, 10:37:52 AM
Thanks Ron, will try this
Title: Re: Application Gone MAd - Continuation
Post by: Bruce on August 05, 2014, 09:43:10 PM
>> as message will pop up a message box on the web server ( development machine ).

there is absolutely no need to use MESSAGE and it will actively break the server if you do. If you want to see the contents of something rather use
p_web.Trace
not
Message
which sends the value to DebugView.

Indeed this is so use ful there is a template option to send the filter to debugview for you.

Cheers
Bruce