NetTalk Central

Author Topic: NT 6 to NT 7 Browse-Form-Field Lookup button  (Read 3694 times)

Jeff Martens

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
NT 6 to NT 7 Browse-Form-Field Lookup button
« on: December 18, 2012, 06:04:54 AM »
I have a Browse and its Form.
On the Form is a field where I force the user to hit the Select button.
Then a pop-up Browse appears.
On this pop-up browse, there is a Select button '?', and a Locator where I have made the locator action 'Field contains ...'
With NetTalk 6.51, I also had checked 'Table blank until Locator entered.'
This worked.

That Locator field does not show, now, with NT7.
In testing, I have unchecked  'Table blank until Locator entered.'.
Then rows of data appear.
But - the locator field does not appear until I click on one of the column headers.

Any suggestions?

Thanks.
---

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT 6 to NT 7 Browse-Form-Field Lookup button
« Reply #1 on: December 18, 2012, 07:10:19 AM »
>> But - the locator field does not appear until I click on one of the column headers.

the locator will only appear if the sort order matches one of the columns. So go into the browse in the app, go to one of the columns, and on the SORT tab tick on "this is the default sort order".

I don't _think_ this has changed from NT6 to NT7 - but I'll take your word for it.

Cheers
Bruce

Vinnie

  • Full Member
  • ***
  • Posts: 183
    • View Profile
    • Email
Re: NT 6 to NT 7 Browse-Form-Field Lookup button
« Reply #2 on: December 18, 2012, 07:24:24 AM »
Same result for me even with default sort entered.

Work around I add to

%AfterSettingFlavor

        Loc:LocateField = 'NST:SearchCat20'
        loc:sortheader = NST:SearchCat20
        loc:vorder = '+NST:SearchCat20'
        loc:vordernumber = '9'
        p_web.SetValue('Lookup_Dealer_sort','13')

Hope this is some help

Jeff Martens

  • Newbie
  • *
  • Posts: 28
    • View Profile
    • Email
Re: NT 6 to NT 7 Browse-Form-Field Lookup button
« Reply #3 on: December 18, 2012, 02:51:15 PM »
Thanks Bruce and Vinnie.


These are my settings which I think are getting me back to where it was working before the update:-

On the form calling the Lookup:

NetWebForm Settings
Fields tab
Select the tab - Properties
Forms tab
Select the field to be filled by the lookup - Properties
Settings tab
Check: Lookup Button
Lookup Settings tab
Check: Popup Lookup
Lookup Settings tab
Name the lookup procedure and give it a Lookup title
From Table: nominate your table
Order by: nominate the key to be used - its field will also be chosen below  (e.g. SurnameKey)
Value field: nominate the field you are fetching (e.g. user barcode)
Description Field: nominate the field you want to display (e.g. user name)
Check: Force user to use lookup
Check: Display Description instead of value


In the Lookup Browse:

NetWebBrowse Settings
Locators tab
Locator Type: Contains
Check: Table blank until Locator entered

NetWebBrowse Settings
General tab
Fields
Nominate the unique key
Select the  prime lookup field - Properties (this field is used in the key mentioned above  e.g. Surname)
Sort tab
Check: This column is the default sort order

---
With so many things going on and as I stumble around, I am unsure why I seemed to lose functionality after the update.

« Last Edit: December 18, 2012, 02:54:33 PM by Jeff Martens »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NT 6 to NT 7 Browse-Form-Field Lookup button
« Reply #4 on: December 18, 2012, 10:52:44 PM »
Hi Jeff, Vinnie,

An example of it non-working is probably the best starting point for figuring out what is happening. Perhaps a shipping example can be modified to show the effect?

cheers
Bruce

Vinnie

  • Full Member
  • ***
  • Posts: 183
    • View Profile
    • Email
Re: NT 6 to NT 7 Browse-Form-Field Lookup button
« Reply #5 on: December 19, 2012, 02:39:20 AM »
Hi Jeff.

I will try to explain.

Leave your lookup as it was in NT6
Add the Default Sort to the lookup browse procedure as Bruce wrote earlier.

Then view the lookup browse procedure source and search for Procedurename_sort  eg(Lookup_Dealer_Sort) where Lookup_Dealer is my procedure.

This will have a ',number' after the procedure name_sort

You can now add and embed to your Lookup browse procedure in my case (Lookup_Dealer)
Embeds
  Before Browse Lookup
     After Setting Browse Behaviour Settings

Add this as source

        Loc:LocateField = 'NST:SearchCat20'       ! (NST:SearchCat20 = your default sort)
        loc:sortheader = NST:SearchCat20
        loc:vorder = '+NST:SearchCat20'
        loc:vordernumber = '9'                              ! ('9' is the number from earlier)
        p_web.SetValue('Lookup_Dealer_sort','9')  ! (Lookup_Dealer = your procedure name and '9' is the number from earlier)


I suspect there is a much better way to make this work but it works for me as a workaround until Bruce sorts this correctly.

Cheers

Vince