NetTalk Central

Author Topic: Popup reseting session value of unique key  (Read 10254 times)

Matthew

  • Full Member
  • ***
  • Posts: 137
    • View Profile
    • Email
Popup reseting session value of unique key
« on: January 17, 2012, 04:57:55 AM »
Hello,

I have the following problem:

I have NetWebBrowse procedure with four columns. The last column is button Other, which call popup memory NetWebForm. In 'OnClick' tab I have the following option:

Procedure: some NetWebForm
Open as Popup (not submit buttons) = TRUE
Title: 'something'
Target Frame: '_self'

For testing I add message box in "User Clicekd on row in the browse" embed, where I put:
MESSAGE(p_web.GSV('TAB:ID')) - unique key

Before I click on the button Other, the TAB:ID number is properly in message box.
After I click on the button Other, popup is showing. After close that popup and click on any browse row the TAB:ID is empty in message box.

Why after popup  the session value of TAB:ID is reset?
Is it a bug or something?

I have to refresh all site to get it work again. I need TAB:ID numer without refreshing all site, because I use this number in popup NetWebForm.

This problem is also when I turn on EIP in browse column (in my situation EIP is number). After change value of that field the session value of TAB:ID is reset.

Regards,
Matthew
« Last Edit: January 17, 2012, 05:07:08 AM by Matthew »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11302
    • View Profile
Re: Popup reseting session value of unique key
« Reply #1 on: January 17, 2012, 05:55:25 AM »
Hi Matthew,

can you duplicate the effect in one of the examples, and post it here please?

cheers
Bruce

Matthew

  • Full Member
  • ***
  • Posts: 137
    • View Profile
    • Email
Re: Popup reseting session value of unique key
« Reply #2 on: January 17, 2012, 11:32:24 PM »
I attach the example with popup problem.

This situation is when the browse procedure is on form and then call popup window from that browse.

Regards,
Matthew

[attachment deleted by admin]

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Popup reseting session value of unique key
« Reply #3 on: February 10, 2012, 04:51:52 PM »
I'm seeing something similar to this.  "Other" button in browse list which calls a popup browse.  Despite my best efforts, I cannot set a session value with the button which can been "seen" by the browse.  No matter what, the session value is empty when the popup browse is called.  It's very weird.

EDIT:  Ah Ha!  I got past this by forcing myself to learn how to pass parameters!  (NetTalk style).  Awesome!!! 

Don
« Last Edit: February 11, 2012, 03:29:02 AM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Matthew

  • Full Member
  • ***
  • Posts: 137
    • View Profile
    • Email
Re: Popup reseting session value of unique key
« Reply #4 on: April 02, 2012, 10:24:43 PM »
Hello,

Getting value from unique key in popup form seems doesn't work. Popup is showing from NetWeBrowse and the value of unique key is reseting.

Could someone help?

I attache example app.

Regards,
Matthew

[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11302
    • View Profile
Re: Popup reseting session value of unique key
« Reply #5 on: April 02, 2012, 11:35:11 PM »
morning Matthew,
got the example - but I'm not sure what I'm supposed to be looking for.
Can you give me some hints on what to do - what I'll see, and what you would prefer to see?

cheers
Bruce

Matthew

  • Full Member
  • ***
  • Posts: 137
    • View Profile
    • Email
Re: Popup reseting session value of unique key
« Reply #6 on: April 03, 2012, 12:23:40 AM »
I would like to get value of unique key in popup form. (it's a MEMORY FORM)

In example is some browse with button named 'click', which open popup form. In that form I have put message box with value of unique key:

MESSAGE(p_web.GSV('TAB:ID'))

For the first time when I click on that button session value isn't empty so its ok, but after that when I click that button in other row this value is empty so I don't know which record I should Fetch.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11302
    • View Profile
Re: Popup reseting session value of unique key
« Reply #7 on: April 04, 2012, 12:01:27 AM »
Hi Matthew,

I compile and run your app. There is no data in the browse, so I click on Insert.
I fill in the fields, click on SAVE and a message box saying "test" appears.
Still nothing in the browse.
A quick look at MyBrowse_EditForm shows it is a memory form. So I've changed that to a Table form, and now I can add the record.

Now the browse has 2 buttons;
a) Button with server-side code - clicking that gives a _server side_ message saying "hello".
b) also popup button. Presumably you want the "row id of the row clicked" when clicking this button.

To get the rowId attached to the button click, you just need to tick on that option for the button - see attached.

Two tips for next time to make it go quicker-
a) it would have been helpful to have a data file included with the example;
b) leaving the form as a "table form" would have made it more obvious as well.

Cheers
Bruce






[attachment deleted by admin]

Matthew

  • Full Member
  • ***
  • Posts: 137
    • View Profile
    • Email
Re: Popup reseting session value of unique key
« Reply #8 on: April 04, 2012, 09:59:17 PM »
Sorry Bruce. I forgot to include data table. My mistake.

I attached example one more time. Could You look?

I have tick on option "include row id."
There is 10 records in browse. Try click on button "Click" in "Popup" column. First click is working, but another click doesn't show the properly value from unique key (p_web.GSV('TAB:ID') or p_web.GetValue('TAB:ID')).

Regards,
Matthew

[attachment deleted by admin]
« Last Edit: April 04, 2012, 10:02:08 PM by Matthew »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11302
    • View Profile
Re: Popup reseting session value of unique key
« Reply #9 on: April 05, 2012, 01:27:05 AM »
Hi Matthew,

Sorry I wasn't clear.

To get the rowId attached to the button click, you just need to tick on that option for the button - see the pic attached to my previous post.

Cheers
Bruce

Matthew

  • Full Member
  • ***
  • Posts: 137
    • View Profile
    • Email
Re: Popup reseting session value of unique key
« Reply #10 on: April 05, 2012, 01:54:43 AM »
I have already tick on option "Include Row ID field" for that button, but still this ID is clear in popup form.
When the form is not running as a popup everythink works fine.

See TestApp.zip (latest version)

Regards,
Matthew

Matthew

  • Full Member
  • ***
  • Posts: 137
    • View Profile
    • Email
Re: Popup reseting session value of unique key
« Reply #11 on: April 05, 2012, 02:41:30 AM »
I found the reason why value of row ID was cleared when open popup form from browse.

This is happening when NetWebBrowse is on the NetWebForm (added as a "procedure field" on form).

When NetWebBrowse isn't on a form then unique value (ID) of a row is properly passed to the popup form.

Regards,
Matthew

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11302
    • View Profile
Re: Popup reseting session value of unique key
« Reply #12 on: April 05, 2012, 05:38:18 AM »
hi Matthew,

the RowId is being passed as a Value to the browse. So 99% of the time, in the browse you want to do a StoreValue call.

So in the top of your GenerateForm routine put
p_web.StoreValue('Tab1:Id')

then elsewhere in the browse (in the filter and so on) you use p_web.GSV('tab1:id')

Cheers
Bruce