Hi,
this is a problem which I solved by implementing my
own textfield and with interceptors. But I couldn't find a generic way to do
it:
consider these settings:
table STOCKS {
STOCKS_ID int,
WKN int
}
where STOCKS_ID is the pk and WKN is unique. (Wkn
is the common german unique id for Stocks).
table POOL {
POOL_ID int,
STOCKS_ID int,
DESCRIPTION varchar
}
where STOCK_ID is the fk.
When editing POOL the user is not interested
in seeing the STOCK_ID because it is technical. he or she wants to edit the WKN.
You can do that in dbforms using a selectbox.
In my case this approach is not feasible because I
have 30000 rows in STOCKS. Thus it takes to much time to load the whole
selectbox.
I would like to have a textField which is prefilled
with the WKN belonging to the STOCKS_ID in table POOL. When user changes the WKN
(in detail view of POOL) and pushes the update Button it would be nice if
dbforms would select the right STOCK_ID and updates it in POOL.
I have implemented a textfield which can pre-fill
it in a generic way (easy, just a merge between DbSelectBox and DbTextField).
But I didn't implement the way back to dbforms where you have to do the mapping
between the unique key and the foreign key (I've implemted it in a
interceptor for my special case).
Do you think it would be ueful to enhance dbforms
to a "textForeignDataField" (or whatever we will call it)?
Any ideas?
I would implement it in my spare time if I get
positive feedback.
Cheers,
Jan.
|
- Re: [dbforms] selectbox with 30000 rows Jan-Friedrich Mutter