cancel
Showing results for 
Search instead for 
Did you mean: 

Fill the second Dropdown List based on user selection

former_member192766
Participant
0 Kudos

Hi All,

I am using Web Services to populate Dropdownlists. This works fine for me.

I have a table with the column "Core Category" and "SUB Category", "Core Category" can have 1 or more SUB Categories.

The SQL statement in the Web Service for "Core Category" looks like this: "Select DISTINCT [core category] from table", this returns a list of categories.

In this example, I want to achieve the following:

When I select a "Core Category' in the first Dropdownlist, the application fires an event or action to fill the second Dropdownlist "SUB Category" with ONLY values that belongs to the selected "Core Category" in the first Dropdown list.

Is this possible with Visual Composer? Please let me know how I can achieve this?

Many Thanks,

Ridouan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ridouan,

Yes it is possible. [Example of Ship and Engine|http://img146.imageshack.us/img146/2968/shipenginezt9.jpg]. Kindly note there is a web service for getting ship and on basis of ship-id selected, engine is filled, which is also deliverd by web service

The intial state of application is ship drop down is enabled but not the engine, that gets enabled only when ship is selected.

Here the steps: Please replace it with your fields:

1. Place the 2 drown down controls.

2. For Ship, Select the web service in the dynamic list of the dropdown, remember at runtime, if those input parameters are not valid it will give the data service error, make use of if statement.

3. Define Store -> shipid, engineid and boolean show_engine - default false

4. Action of ship -> ASSIGN action -> true to show_engine from data store

5. Value of ship ->

=store@SHIP

6.For engine, Select the web service in the dynamic list of the dropdown, remember at runtime, if those input parameters are not valid it will give the data service error, make use of if statement. Where the paramter for shipid is to be filled

=IF(store@SHIP!="",UPPER(store@SHIP),"AVRA")

7. Value of engine ->

=store@ENGINE

Let me know, if helps.

Best regards,

Dharmi

Edited by: Dharmi Tanna on Jun 27, 2008 3:23 PM

former_member192766
Participant
0 Kudos

Thanks Dharmi.

Answers (0)