NetTalk Central

Author Topic: parameters to a memoryform  (Read 4854 times)

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
parameters to a memoryform
« on: January 04, 2019, 04:44:03 PM »
Hi,

When I call a NetWebForm and I send some parameters in the url, I usually would hand code a p_web.storevalue() for each parameter right after the 'code' keyword in the procedure. Is this the right place?
If however I hand code for more parameters than there are in the URL, will this still work?
I think I have some trouble  getting my parameters into the session_value_queue, using this method.

If required I'll send an example.

Rene
Rene Simons
NT14.14

JZL

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • Email
Re: parameters to a memoryform
« Reply #1 on: January 04, 2019, 05:05:49 PM »
Yes - I do

Loc:field = p_web.getvalue(?passfield?)
p_web.ssv(?Loc:field?,Loc:field

Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: parameters to a memoryform
« Reply #2 on: January 05, 2019, 06:06:54 AM »
Hi,

Thanks for your reply but I am not sure I can fillow the Yes - I do part.

Rene
Rene Simons
NT14.14

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: parameters to a memoryform
« Reply #3 on: January 08, 2019, 12:10:08 AM »
>> Loc:field = p_web.getvalue('passfield')
>> p_web.ssv('Loc:field',Loc:field)

This is not a good way to do it, since if the 'passfield' value does not exist then the sessionValue of Loc:Field will be cleared.

A better approach is

p_web.StoreValue('passfield')

which moves the value to a session value, but _only_ if it exists as a value.

Yes, you can do this in a browse or form right at the top, after the Code statement.

>> If however I hand code for more parameters than there are in the URL, will this still work?

While I'm not 100% sure what you mean here - yes if you do a
p_web.SetValue('bruce','123')
and then
p_web.StoreValue('bruce')
then it will work the same.

cheers
Bruce


Rene Simons

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: parameters to a memoryform
« Reply #4 on: January 08, 2019, 05:51:11 AM »
Hi,
The last question was anwered implicitly in my item about the drop-list, simply by getting it to work.
Thanks.
Ren
Rene Simons
NT14.14