Problem to write query for field cascading dropdown

I used to write query for field databasejoin, it was something like:
WHERE name LIKE '%CC%'
and that works fine for me.

Now i have similar problem with field that is cascading dropdown.
I need, on my form, when dropdown this field to see only some records not all.
The condition is like:
WHERE {ccjom_cc_wyposaz_przeg_maszyn___wym_przeg_tak_nie}='nie wymaga'

or:
WHERE {ccjom_cc_wyposaz_przeg_maszyn___wym_przeg_tak_nie}='nie'

i am not sure what to use:
---------------------------------------------------------------------------------
I have for my field cascading dropdown:

Fabrik: edit element

Options:
Table: Rejestr 1 (ccjom_cc_wyposaz_przeg_maszyn)
Id: id
Label: Nazwa
Watch element: Typ
Foreign key: Typ wyposa?enia
---------
Where query: {ccjom_cc_wyposazenie_prz_maszyn___wym_przeg_tak_nie} = 'nie wymaga'
--- this is what i try---
---------
---------------------------------------------------------------------------
On table Rejestr 1 i have fields:
Name: ccjom_cc_wyposaz_przeg_maszyn___nazwa_urzadz
Label: Nazwa
Plugin: field
--------------- this is the field i make cascading dropdown to it

Name: ccjom_cc_wyposaz_przeg_maszyn___wym_przeg_tak_nie
Label: Wymaga przegl?du
Plugin: dropdown
--------------- this fields has 2 values:
value ------ | ------ label
wymaga | tak
nie wymaga | nie
------ this is the field i try to use in query --- when dropdown field "Nazwa" on my form - i need to see only that records that have field "Wymaga przegl?du" = 'nie wymaga'


Query doesn't work - i am not sure if the idea is good or what in query is wrong?
Please any tip.
 
I'm sorry, I'm confused by your description.

Can you tell me the two fields you need to match?

In general, your query would look like:

WHERE {thistable}.field_to_match = '{yourtable___dropdown_to_match_raw}'

-- hugh
 
I need for values of my field that is cascading dropdown set filter on my form.
I need to see only some values when click with mouse on that cascading dropdown on form.

My cascading dropdown field on my form is:
{ccjom_cc_wyposaz_przeg_maszyn_przeglad___urzadz_nazwa}

i match it with:
{ccjom_cc_wyposaz_przeg_maszyn___nazwa_urzad}

but i want to filter values - show only that
where:
{ccjom_cc_wyposaz_przeg_maszyn___wym_przeg_tak_nie} = 'nie'

I have a problem with setting a filter...
 
I didn't write it enought clear in my first post.

Question is : Is possible to filter data that are visible in cascading dropdown field on form?
How to write a condition that filter data in cascading dropdown when we open the "cascading dropdown window" with mouse?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top