NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Johan van Zyl on October 20, 2014, 12:41:07 PM

Title: SSV and GSV
Post by: Johan van Zyl on October 20, 2014, 12:41:07 PM
In LoginForm
Stops 1&2 work - 3&4 do not

LoginForm Validate Update 2 End
       stop('1 Loc:Login = '&Loc:Login)
        p_web.SSV('Loc:Login','Loc:Login')
        stop('2 Loc:Login = '&Loc:Login)
        p_web.SSV('loc:savedlogin','Loc:Login')
        stop('3 loc:savedlogin = '&loc:savedlogin)
        p_web.SSV('loc:savedlogin', p_web.GSV('Loc:Login'))
        stop('4 loc:savedlogin ='&loc:savedlogin)

If I cannot even retrieve the Loc:Login on the LoginForm how will I retrieve it in  another procedure i.e.
some update form in eg PostUpdate - to store who is logged in and therefore made the changes to the table?
Title: Re: SSV and GSV
Post by: Vinnie on October 20, 2014, 01:02:05 PM

       stop('1 Loc:Login = '&Loc:Login)
        p_web.SSV('Loc:Login','Loc:Login')
        stop('2 Loc:Login = '&Loc:Login)
        p_web.SSV('loc:savedlogin','Loc:Login')
        stop('3 loc:savedlogin = '&loc:savedlogin)
        p_web.SSV('loc:savedlogin', p_web.GSV('Loc:Login'))
        stop('4 loc:savedlogin ='&loc:savedlogin)



       stop('1 Loc:Login = '&Loc:Login)
        p_web.SSV('Loc:Login','Loc:Login')
        stop('2 Loc:Login = '&Loc:Login)
        p_web.SSV('loc:savedlogin','Loc:Login')
        stop('3 p_web.GSV('loc:savedlogin') = '&loc:savedlogin)
        p_web.SSV('loc:savedlogin', p_web.GSV('Loc:Login'))
        stop('4 p_web.GSV('loc:savedlogin') ='&loc:savedlogin)


Title: Re: SSV and GSV
Post by: peterH on October 20, 2014, 01:11:16 PM
Johan,

Don't put quotes around the value in p_web.ssv() - when it's a variable.

Peter
Title: Re: SSV and GSV
Post by: Johan van Zyl on October 20, 2014, 02:32:20 PM
Johan,

Don't put quotes around the value in p_web.ssv() - when it's a variable.

Peter

This does not work either

 stop('1 Loc:Login = '&Loc:Login)
        p_web.SSV(Loc:Login,Loc:Login)
        stop('2 Loc:Login = '&Loc:Login)
        p_web.SSV(loc:savedlogin,Loc:Login)
        stop('3 loc:savedlogin = '&loc:savedlogin)
        p_web.SSV(loc:savedlogin, p_web.GSV(Loc:Login))
        stop('4 loc:savedlogin ='&loc:savedlogin)
Title: Re: SSV and GSV
Post by: Johan van Zyl on October 20, 2014, 02:35:31 PM

 
       stop('1 Loc:Login = '&Loc:Login)
        p_web.SSV('Loc:Login','Loc:Login')
        stop('2 Loc:Login = '&Loc:Login)
        p_web.SSV('loc:savedlogin','Loc:Login')
        stop('3 p_web.GSV('loc:savedlogin') = '&loc:savedlogin)
        p_web.SSV('loc:savedlogin', p_web.GSV('Loc:Login'))
        stop('4 p_web.GSV('loc:savedlogin') ='&loc:savedlogin)




Vinnie, I do not understand your reply - unless you only wanted to improve the STOPS - but my problem is - I do not get the value of Loc:Login into loc:savedlogin - even in the same procedure. And I would like to use loc:savedlogin, or Loc:Login for that matter, in another procedure - how do I do that? Thx
Title: Re: SSV and GSV
Post by: Johan van Zyl on October 20, 2014, 02:58:40 PM
Finally - it has dawned on me!

p_web.SSV('loggedin',Loc:Login)     
loc:savedlogin = p_web.GSV('loggedin')

where 'loggedin' is a SESSION variable that is created "on the fly" - i.e. inside the SSV function!