Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

dinamic filter on lookup fields

Posted on 2004-03-25
11
338 Views
Last Modified: 2010-04-05
Hi,

Want to make a lookup field that depends where the possible values depends on another fields's value.
I set the lookupdatasets filter property and set the filtered property to true as well. Even tried Refresh still nothing happened. Got the same list in the lookup field. How could i solve this problem?

I tried to use customconstraint too but didn't work.

for example one field is country and the other is town
if someone picks country he can pick a toen only from that country (only that the connection is much more complex : depends on other tables of the dataset)

thanx
0
Comment
Question by:gully1
  • 6
  • 2
11 Comments
 
LVL 17

Expert Comment

by:mokule
ID: 10676335
May be You should use TQuery.
Give some more details. What do You exactly mean by lookup field
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 10676363
disable the lookupcache-property (-> false)

meikl ;-)
0
 

Author Comment

by:gully1
ID: 10701895
Well, I set the lookupcache to false yet the list didn't refresh.

0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 27

Accepted Solution

by:
kretzschmar earned 125 total points
ID: 10701938
do you use ado or bde?
0
 

Author Comment

by:gully1
ID: 10701957
To be more precise, I have a dependency table which is in fact a list of pairs of the elements of two other tables. Not foreign keys but strings still it defines the other tables elements . So when the users picks up one element of the first table i want to show him in my lookup list of the other table only those that are linked to it (has a pair of the two in the dependency table).
I simplificated it a little, but i guess if i got a solution for this, I can solve the problem.
What i did was:
When the first field changed i collected the linked objects from the dependency table and set the filter.
0
 

Author Comment

by:gully1
ID: 10701969
I use SQLDirect (changed a bit).
A query inherited from TSDQuery(inh from TQuery).
0
 

Author Comment

by:gully1
ID: 10702010
Sorry if i didn't answer your question. It doesn't use BDE.
0
 

Author Comment

by:gully1
ID: 10937879
Ok I found the solution. Closed the lookupdataset, set a new SQL for it and reopened. It worked.
Probably filtering has no effect on the lookuplist.
0
 

Author Comment

by:gully1
ID: 10940630
no thanks
i have enough

(what else can you show me :))
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Controlled Assessment GCSE - desperate help needed 4 102
SUM 2 INTEGER ARRAYS INTO 1 10 108
Firemonkey webbrowser scrollbars ? 1 50
Delphi android app hide keyboard 3 16
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question