[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

dinamic filter on lookup fields

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
gully1
Asked:
gully1
  • 6
  • 2
1 Solution
 
mokuleCommented:
May be You should use TQuery.
Give some more details. What do You exactly mean by lookup field
0
 
kretzschmarCommented:
disable the lookupcache-property (-> false)

meikl ;-)
0
 
gully1Author Commented:
Well, I set the lookupcache to false yet the list didn't refresh.

0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
kretzschmarCommented:
do you use ado or bde?
0
 
gully1Author Commented:
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
 
gully1Author Commented:
I use SQLDirect (changed a bit).
A query inherited from TSDQuery(inh from TQuery).
0
 
gully1Author Commented:
Sorry if i didn't answer your question. It doesn't use BDE.
0
 
gully1Author Commented:
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
 
gully1Author Commented:
no thanks
i have enough

(what else can you show me :))
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now