NetTalk Central

Author Topic: Select Lookup field embedpoint  (Read 4118 times)

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Select Lookup field embedpoint
« on: July 09, 2013, 11:25:44 PM »
Hi Bruce

On a netwebform I need to set a SSV when the lookup field is selected before the lookup browse displays, I want to use the session value to be the filter on the browse, where can I add the SSV when the field is selected?

Regards
Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Select Lookup field embedpoint
« Reply #1 on: July 10, 2013, 01:18:32 AM »
The short answer is that you can't do it like that. The lookup button is pressed in the browser, the lookup appears in the browser, up to this point the serve is not in the loop.

So tell me more - what are you planning to set the Session Value to?

cheers
Bruce

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Re: Select Lookup field embedpoint
« Reply #2 on: July 10, 2013, 01:27:56 AM »
I have 20 fields that must use the same Lookup procedure, each field have a different "type" value that the lookup browse must filter on before opening the browse.

In Routines- CallDiv- Selected Event, IF I add code in this embed point, then nothing happens. What is this embed point used for?

When I add in the next embeded point - Accepted Event- it works but first bring the lookup browser up, select and after closing the browser, the stop happens.

Regards
Johan
« Last Edit: July 10, 2013, 01:35:16 AM by johanco123 »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Select Lookup field embedpoint
« Reply #3 on: July 10, 2013, 04:03:46 AM »
hi Johan,

>> I have 20 fields that must use the same Lookup procedure, each field have a different "type" value that the lookup browse must filter on before opening the browse.

ok, but anything you want passed there must be added to the button when the window is generated. (As far as I can see there's no obvious template option to pass a parameter to the lookup procedure, which may make things tricky for you.)

the button is in the browser. Not on the server. So when you click on the button, code runs in the browser, not on the server. That code opens the lookup window.

>> In Routines- CallDiv- Selected Event, IF I add code in this embed point, then nothing happens. What is this embed point used for?

to notify the server when the user selects an entry field in a form. It serves no use for a button.

>> When I add in the next embeed point - Accepted Event- it works but first bring the lookup browser up,

yes, like I say, the lookup is opened by the browser. (The lookup procedure is always there on the page, it's just hidden')

>> select and after closing the browser, the stop happens.

correct - there's no embed to do what you want because what you are looking at does not happen on the server. The only way this works is if a "parameter" is added to the lookup button (something not currently in the template.) That can be added to the list of things to do.



Cheers
Bruce


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Select Lookup field embedpoint
« Reply #4 on: July 10, 2013, 10:49:15 PM »
For 7.15 I've added a "parameters" field for the lookup button. This is in the normal URL parameters form - ie an & separated list of name=value.
so for example you could set it to
'FromField=1'
then in the browse do a
p_web.StoreValue('FromField')
and after that use
p_web.GetSessionValue('FromField')
in the filter.

cheers
Bruce



johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Re: Select Lookup field embedpoint
« Reply #5 on: July 11, 2013, 04:29:58 AM »
Many tanks Bruce

Will this also works if this is Popup Lookup?

Regards
Johan

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Select Lookup field embedpoint
« Reply #6 on: July 11, 2013, 04:51:33 AM »
yes.

johanco123

  • Full Member
  • ***
  • Posts: 245
    • View Profile
    • Email
Re: Select Lookup field embedpoint
« Reply #7 on: July 11, 2013, 04:53:32 AM »
Many tanks Bruce ;D ;D ;D ;D