help about cascade dropdown with sql data

More
8 years 1 week ago #65355 by agbandini
Hello,
I'm trying to create two depending cascade dropdown in my project but it doesn't' work.
The situation is:

FieldA (type dropdown)
in "value" tab I set "use sql" with this query "select tab1_id as value, tab1_name as text from table1"
master field is set on "NO"

FieldB (type dropdown)
in "value" tab I set "use sql" with this query "select tab2_id as value, tab2_name as text from table2 where tab2_id_tab1 = 'masterValue'"
master field is set on "fieldA"

but when I select an item on field A the fieldB remains empty. Please help me!!!

Thank you

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #65358 by micker
you can't do this with sql i think
you can do this with raw value and master field option

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #65372 by agbandini
Hello,

I don't understand,
the component not supports the cascade dropdown based on sql? Or I've to set the "use SQL" to no in fieldA and insert the sql sintax in the raw editor?

But in this case, can you explain me the right syntax to create a sql string regognizable by the second dropdown?

thank you

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago - 8 years 1 week ago #65377 by agbandini
I've found this video tutorial ( vimeo.com/174007364 ) that uses sql instructions for the dropdowns, I've nomalized my sql with these examples, in detail:

Drop1:
select tab1_id as value, tab1_name as text from table1

Drop2:
select tab2_id as value, tab2_name as text, tab2_id_tab1 as valgrp from table2

But the second dropdown show all the table field (no filtering)...but why???

Please help me :(
Last edit: 8 years 1 week ago by agbandini.

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #65383 by micker
at first trhanks for video
second i think you forgot where condition in your valgrup

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #65388 by agbandini
Yes, I want to put the where statement....but the corrent sitax?

in the second dropdown query I've to write
select tab2_id as value, tab2_name as text, tab2_id_tab1 as valgrp from table2 where valgrp = #TO_WHAT?#

Suggestions?

thank you

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.758 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline