NetTalk Central

Author Topic: Selecting browse record  (Read 2975 times)

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Selecting browse record
« on: February 04, 2013, 04:23:20 PM »
I have a form with an entry field that I want to be able fill from a selection on a browse. I added a Select button which displays the browse, but I can't get the Select option working in the browse to close the Browse screen and return the record ID. Does one of the examples have any code doing this? I'm sure it's something fairly simple but I haven't been able to get it working yet.

Thanks,

Mark

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Selecting browse record
« Reply #1 on: February 04, 2013, 04:45:11 PM »
Hi Mark,

have you tried making the field a lookup or does that not fit your requirements? If it's a lookup then it should all work as expected. If not you need to fake it a bit but I have managed to get it working.

Kev

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Selecting browse record
« Reply #2 on: February 04, 2013, 09:49:29 PM »
Hi Mark,

yeah, I think you missed the right approach here.
the correct approach is to tick on the option for the entry field "use lookup" (it's on the settings tab) then enter all the details on the Lookup tab. If you want to force the user to use the lookup then there's an option for that.
That said, lookups are really powerful as they are (especially if auto-complete is also on), so that is likely unnecessary.

You don't need to manually add a button or anything like that.

cheers
Bruce

markster

  • Full Member
  • ***
  • Posts: 204
    • View Profile
    • Email
Re: Selecting browse record
« Reply #3 on: February 05, 2013, 04:23:35 PM »
I actually had 2 different scenarios to deal with: 1) user enters a new name so there's nothing to look up, and 2) user selects from an existing name, ie a lookup. The resultant field in both cases is a unique record ID which is then used for all subsequent access (change, delete, view) to the form.  It proved easier to simply split the procedures into two as the two different scenarios were being called from two different places anyway. I was then able to fiddle with the lookup processing in 2) to get what I needed.

Thanks,

Makr