NetTalk Central

Author Topic: Inserting Records into a Lookup Table . Possible ?  (Read 4762 times)

britech

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Inserting Records into a Lookup Table . Possible ?
« on: July 21, 2010, 03:35:33 PM »
Hi Folks,
We have an order form that calls a lookup table for a list of clients.
If the client we want isn't there, we would like to insert one at that moment and then select it to complete the form that called the lookup in the first place.

At the moment, only the SELECT button is visible when we call the lookup. Is there any way to make the Insert button visible on the Lookup browse, or is this not possible with the current implementaion of the templates?

Look forward to your comments.
Brian
NT5 PR26
6.3 9055

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Inserting Records into a Lookup Table . Possible ?
« Reply #1 on: July 21, 2010, 05:33:03 PM »
Yes from memory out of the Box that is not an option. I have attempted to create my own lookups with this option but I'm getting some strange results - which may explain why it is not there out of the box. I had planned to hit up Bruce at the up coming Web Workshops for an explanation and any work arounds.

If you are using Pop-up lookups it sounds like the way it works adding on the fly would not be an option.

britech

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Inserting Records into a Lookup Table . Possible ?
« Reply #2 on: July 21, 2010, 07:03:26 PM »
Perhaps Bruce can suggest a way to accomplish this . It is a pretty standard process for most of my Windows interfaces, particularly on our Order Entry systems. I have to come up with something before the end of the week.
Here's hoping ...

Brian
NT5 PR26
6.3 9055

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Inserting Records into a Lookup Table . Possible ?
« Reply #3 on: July 21, 2010, 10:02:55 PM »
Hi Brian,

At the moment, out the box, no it's not an option.
Because of the stateless nature of web pages it's quite far from a trivial requirement.

One possible work-around  (which I have NOT tested) is to add a button to the form, which has a URL that directly calls the Client form, but in another tab. (ie target set to '_blank')

I'm hopeful of a possible extension to the templates to allow the old browse - form - lookup - form option, or possibly IIP (Insert-In-Place) but I'm not sure if I'll get that out soon - definitely not in the next week unless I'm really lucky.

Cheers
Bruce

britech

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Inserting Records into a Lookup Table . Possible ?
« Reply #4 on: July 22, 2010, 03:16:27 AM »
Thanks Bruce ,
We'll experiment a bit to see what we can come up with.
Cheers,
Brian
NT5 PR26
6.3 9055

britech

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Inserting Records into a Lookup Table . Possible ?
« Reply #5 on: July 22, 2010, 05:30:27 AM »
Hi Bruce,

John Rae and I have been reviewing this problem and we may have a reasonable work around but need a bit of clarification.

1. We added an Insert Button in the Lookup Browse, where you would normally put a print button , etc, and we successfully added a new client in the lookup Browse. However, the Action is no longer SELECT when we complete the Insert. Is there a way to set the ACTION back to SELECT, so that we can then select the record ? We also noticed that the LookUp Browse is no longer on the newly added record, so re-setting the position may require some handcoding.

2. An alternative to Selecting the newly added record, would be to return to the Calling Form with all the required values in session variables, and then just updating the fields in an embed point of the lookup button upon a return.
Question: Is there a particular embed point on the lookup button that you would suggest for loading the Parent Form fields with the session variables brought back from the Lookup Browse?

Look forward to your comments.
Brian
NT5 PR26
6.3 9055

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Inserting Records into a Lookup Table . Possible ?
« Reply #6 on: July 22, 2010, 06:13:34 AM »
Hi Brian,

>> Is there a particular embed point on the lookup button that you would suggest for loading the Parent Form fields with the session variables brought back from the Lookup Browse?

Your premise is false. You do not return from the lookup to the form. You do not return from  the Insert form to the lookup. At each step you are going forwards. At each step the user can skip one or more steps by typing in the URL, or clicking the browser back button.

forms use SessionVariables to display their wares. There is nothing really "selected" by a Select button. The Select submits the "browse" (the <form> structure of the browse) and this contains some details, yes, but you are going forward.

The harder part is keeping track of what page to go forward to, taking the above navigation problems into consideration.

cheers
Bruce


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Inserting Records into a Lookup Table . Possible ?
« Reply #7 on: July 22, 2010, 06:14:49 AM »
Of course you also need to think about, "what if the Insert form has a lookup on it" ?