NetTalk Central

Author Topic: GSV vs GetValue  (Read 4598 times)

broche

  • Sr. Member
  • ****
  • Posts: 336
    • View Profile
    • Email
GSV vs GetValue
« on: April 18, 2019, 10:33:11 PM »
CL 10
NT 11.07

Hi All, sorry I know this is has been rehashed a few times but for some reason I still get confused as to when to use different calls.

The Session View (GSV and SSV): Exist on a specific thread?
GetValue and SetValue are used when?
If I am on a form populated from a table and changing values on that form dependent on other field changes, can I use the direct field name without the above?


Brian.
Brian

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: GSV vs GetValue
« Reply #1 on: April 23, 2019, 05:31:17 AM »
>> The Session View (GSV and SSV): Exist on a specific thread?

No. Session values belong to a "session" (aka a "user"). They are "global for the session" so exist across multiple threads.
Mostly in your code you will want to use SessionValues.

>> GetValue and SetValue are used when?

Each incoming request (that you can see in the log) contains any number of parameters and data. These parameters are accessed via GetValue. They only exist for the life of the thread. If you want to "keep" the value then use the p_web.StoreValue method which moves the value into a Session Value.

SetValue is pretty rarely used, and basically used to pass parameters between procedures on the same thread.

cheers
Bruce