NetTalk Central

Author Topic: Call browse from menu in select mode  (Read 4602 times)

Poul Jensen

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • Email
Call browse from menu in select mode
« on: August 04, 2013, 03:50:10 AM »
Hi,

How do I call a browse in select mode from the menu.
When I then select a record which embed in the browse do I use to store some values ?

Cheers,
/Poul

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Call browse from menu in select mode
« Reply #1 on: August 04, 2013, 08:28:58 PM »
not sure  I understand your question but if you open a browse the highlighted (or selected) record's unique id (that you nominate via the template) will be in the session Q.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Call browse from menu in select mode
« Reply #2 on: August 05, 2013, 12:00:44 AM »
>> How do I call a browse in select mode from the menu.

I've not tried this myself, but I think if you set the parameters;
WhateverBrowse?LookupField=something&Lookup_Btn=LookupBtn
then the browse will open in "select" mode.

>> When I then select a record which embed in the browse do I use to store some values ?

I don't think you need to do this bit. The ID of the selected row will be pushed into the SessionQueue for you. (Although I've not tested this approach.)

cheers
Bruce

Poul Jensen

  • Full Member
  • ***
  • Posts: 191
    • View Profile
    • Email
Re: Call browse from menu in select mode
« Reply #3 on: August 05, 2013, 01:41:36 AM »
Thanks Kevin & Bruce.

Just what I need.

/Poul

alan

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
Re: Call browse from menu in select mode
« Reply #4 on: September 11, 2013, 05:31:41 PM »
Bruce,

You said - "The ID of the selected row will be pushed into the SessionQueue for you."  How do I retrieve that value.

I am calling a browse from a source procedure. I set the browse selection method to "radio" and my unique is s cas:sysId.

In the source procedure, after the browse closes, I need to get the record that was selected in the browse.  I tried p_web.GSV('cas:sysId') but that didn't give me anything. (this is not a typical "lookup" scenario)

Thanks,

Alan
Alan Schoolcraft

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Call browse from menu in select mode
« Reply #5 on: September 11, 2013, 10:00:03 PM »
Hi Alan,

>> How do I retrieve that value.

cus:id = p_web.GetSessionValue('cus:id')

where cus:id is the name of the field you are retrieving.

>> I am calling a browse from a source procedure.

source or netwebsource?

>> I set the browse selection method to "radio" and my unique is s cas:sysId.

use Highlight, not Radio. I haven't tested the Radio in ages and ages, and it's basically deprecated. It's a left-over from the early days of NT4 before we had highlighting.

>> In the source procedure, after the browse closes, I need to get the record that was selected in the browse. 

I'm glad you're coming to the training because I think you're on completely the wrong track here. Fortunately we cover this early in the training, and it can take a bit to get your head around. You're thinking of the browse as a "procedure" (which it's not - think of it more as an "event handler".) - indeed even the concept of "calling it" is probably false. You don't really "call a browse" in your code, the user calls the browse from the browser.

<< I tried p_web.GSV('cas:sysId') but that didn't give me anything. (This is not a typical "lookup" scenario)

sure - but once you step outside the "typical" then you need a solid grounding in the flow so you can figure out where to inject code.

the short answer is that when selected the value is put into the Session Queue. So you don't "get it on return" and you don't "do something after the select" - rather you just use it where you need to use it.

I'm not making much sense I know, hopefully this will all make better sense in a couple weeks time.

cheers
Bruce

alan

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
    • Email
Re: Call browse from menu in select mode
« Reply #6 on: September 12, 2013, 12:05:44 PM »
Bruce,

>>use Highlight, not Radio.<<

You were right.  Once I changed my browses to use Highlight selection method everything worked as expected.

My confusion was that I had spent hours and hours trying to figure out how to read the row id's stored by the browses.

Turns out I was doing it correctly but, the Radio selection option causes the browses to not push the id into SessionQueue.

BTW - I believe I actually have made pretty good progress at understanding this stuff (but can't wait for CIDC).  I just haven't stopped to think about changing my vocabulary to "web speak"  when I try to explain what I'm doing.
Alan Schoolcraft

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: Call browse from menu in select mode
« Reply #7 on: September 12, 2013, 09:32:18 PM »
ahh the usual
walk the walk but not
talk the talk
argument
 ;D