davep
Posts: 41
|
| Posted: 01/28/2009, 9:10 AM |
|
First off, please excuse me, but I'm very new to this environment. That said, I have a situation where I'm trying to add records to a table and I need to select the entry for one field from another table. I tried to use a listbox pointed at the data source, which works fine on several other fields on the form, but the table for this field (VendorID) has over 10K records and just times out. So, what I'd like to do is have this field dynamically present a search and grid form from which the appropriate vendor can be selected by name and have vendorID returned and written to the field.
I'm sure this is possible, but I can't seem to figure it out. Any help is greatly appreciated.
Thanks,
Dave
|
 |
 |
jjrjr1
Posts: 942
|
| Posted: 01/28/2009, 10:01 AM |
|
Hi Dave
Try using the DLookup action in the before show event for the page or control.
That should do it nicely.
Have fun
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
datadoit
|
| Posted: 01/28/2009, 11:38 AM |
|
Welcome aboard Dave.
See http://examples.codecharge.com
A couple of things that may work for you are Dependent Listboxes to get
the 10k records down to a reasonable level, or a Pop-up List and Smart
Lookup.
|
|
|
 |
davep
Posts: 41
|
| Posted: 01/29/2009, 9:54 AM |
|
Quote jjrjr1:
Hi Dave
Try using the DLookup action in the before show event for the page or control.
That should do it nicely.
Have fun
Thanks, but I don't think this is what I'm looking for. I need to present a list of choices for the user to choose from.
Thanks,
Dave
|
 |
 |
davep
Posts: 41
|
| Posted: 01/29/2009, 10:06 AM |
|
Quote datadoit:
Welcome aboard Dave.
See http://examples.codecharge.com
A couple of things that may work for you are Dependent Listboxes to get
the 10k records down to a reasonable level, or a Pop-up List and Smart
Lookup.
Thanks!
Okay, so I'm trying to get this working in my environment but haven't been able to so far. I've got a record form with the "lookup" link. It executes using OpenPop_UpList() and brings up the grid with my 10K vendors. I have the VendNo field in the grid configured as a link and it's onclick event set to: SetOpenerValue(this);return false; and the SetOpenerValue() function configured in the HTML header. It's seems like it should work, but it doesn't.
When I click on the VendNo link, it seems to refresh the page and does nothing more. It doesn't even close the window as programmed in SetOpenerValue(). To try and debug, I set the name of the document in the SetOpenerValue() function code to something that doesn't exist. I clicked on the VendNo link again and didn't get an error. I've used "view source" and the onclick property seems to be correct for the VendNo link...
Any ideas?
Thanks,
Dave
|
 |
 |
datadoit
|
| Posted: 01/29/2009, 10:51 AM |
|
davep wrote:
> Okay, so I'm trying to get this working in my environment but haven't been able
> to so far. I've got a record form with the "lookup" link. It executes using
> OpenPop_UpList() and brings up the grid with my 10K vendors. I have the VendNo
> field in the grid configured as a link and it's onclick event set to:
> SetOpenerValue(this);return false; and the SetOpenerValue() function configured
> in the HTML header. It's seems like it should work, but it doesn't.
>
> When I click on the VendNo link, it seems to refresh the page and does nothing
> more. It doesn't even close the window as programmed in SetOpenerValue(). To
> try and debug, I set the name of the document in the SetOpenerValue() function
> code to something that doesn't exist. I clicked on the VendNo link again and
> didn't get an error. I've used "view source" and the onclick property seems to
> be correct for the VendNo link...
>
----------------------------
You won't get an error. It'll just not execute. That's what's
happening with the popup window not even closing - it's not getting to
that point because of a previous error in the javascript.
Try to isolate some things by using javascript alerts - alert('howdy');
Use that to make sure you're getting variable values expected, that
you're even getting into the javascript function, etc. If you're
feeling brave, go get the Firefox (if you're using Firefox - and of
course you are!) Web Developer plugin so that you can step through the
javascript code to find where your problem is.
Other than that we'll need to see your related code to try and help from
both the parent page and the popup page.
|
|
|
 |
davep
Posts: 41
|
| Posted: 01/29/2009, 10:43 PM |
|
Quote datadoit:
You won't get an error. It'll just not execute. That's what's
happening with the popup window not even closing - it's not getting to
that point because of a previous error in the javascript.
Try to isolate some things by using javascript alerts - alert('howdy');
Use that to make sure you're getting variable values expected, that
you're even getting into the javascript function, etc. If you're
feeling brave, go get the Firefox (if you're using Firefox - and of
course you are!) Web Developer plugin so that you can step through the
javascript code to find where your problem is.
Other than that we'll need to see your related code to try and help from
both the parent page and the popup page.
Thanks for the tip. I guess as you can see I'm very new to any js. Anyway, I added the plugin - what a great tool! And I found that the problem was some case mismatching in the SetOpenerValue() function. It all works now.
Thanks for the help,
Dave
|
 |
 |
datadoit
|
| Posted: 01/30/2009, 5:59 AM |
|
Awesome
|
|
|
 |
|