NetTalk Central

Author Topic: Application Gone MAd - Continuation  (Read 5573 times)

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Application Gone MAd - Continuation
« 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
Brian

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Application Gone MAd - Continuation
« Reply #1 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.
Brian

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Application Gone MAd - Continuation
« Reply #2 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

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Application Gone MAd - Continuation
« Reply #3 on: August 04, 2014, 06:38:27 PM »
What embed do I use to put that code in please.
Brian

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Application Gone MAd - Continuation
« Reply #4 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.

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Application Gone MAd - Continuation
« Reply #5 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.
Brian

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Application Gone MAd - Continuation
« Reply #6 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]
Cheers,

Stu Andrews

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Application Gone MAd - Continuation
« Reply #7 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
Brian

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Application Gone MAd - Continuation
« Reply #8 on: August 04, 2014, 10:32:20 PM »
Good to hear Brian.
Cheers,

Stu Andrews

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Application Gone MAd - Continuation
« Reply #9 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.
Brian

rjolda

  • Sr. Member
  • ****
  • Posts: 329
    • View Profile
    • Email
Re: Application Gone MAd - Continuation
« Reply #10 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

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
Re: Application Gone MAd - Continuation
« Reply #11 on: August 05, 2014, 10:37:52 AM »
Thanks Ron, will try this
Brian

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Application Gone MAd - Continuation
« Reply #12 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