# DropDown Liste Databinding

**URL:** <https://discuss.workflowgen.com/t/dropdown-liste-databinding/1495>\
**Category:** Process Design\
**Created:** [September 27, 2019, 2:02pm UTC](https://discuss.workflowgen.com/t/dropdown-liste-databinding/1495 "2019-09-27T14:02:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@sara](https://discuss.workflowgen.com/u/sara)\
**Post date:** [September 27, 2019, 2:02pm UTC](https://discuss.workflowgen.com/t/dropdown-liste-databinding/1495/1 "2019-09-27T14:02:48Z")

</div>

Hello,

I have 2 dropdown List , the first one contains a list of categories and the secon one contains subCategories.

How can I choose an item from the First List and then display only subcategories in the second one .

I have my tables in WFGEN Database and I created two global Lists.

Best Regads,  
Sara .

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [September 27, 2019, 8:22pm UTC](https://discuss.workflowgen.com/t/dropdown-liste-databinding/1495/2 "2019-09-27T20:22:28Z")

</div>

Hi @sara,

Let’s say List 1 contains

| Value |
| --- |
| A |
| B |
| C |

And List 2 contains:

| Value | Text |
| --- | --- |
| A | 1 |
| A | 2 |
| A | 3 |
| B | 1 |
| B | 2 |
| C | 1 |

With the below setup of the dropdownlists:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/b83e1d9420181e42f9238e2d23a01d9c12fa216e.png)

If DroprownListBox1 = A --\> DropdownListbox2 will contain 1,2 and 3  
If DroprownListBox1 = B --\> DropdownListbox2 will contain 1 and 2  
If DroprownListBox1 = C --\> DropdownListbox2 will contain 1

Hope this helps.

Eddy.

---

<div class="post-metadata">

**Author:** ![sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@sara](https://discuss.workflowgen.com/u/sara)\
**Post date:** [September 30, 2019, 9:14am UTC](https://discuss.workflowgen.com/t/dropdown-liste-databinding/1495/3 "2019-09-30T09:14:26Z")

</div>

Hello,

Thanks for the reply Eddy.  
Should I add an sql join to the the select request in the second dropdownlist?

Best Regards,  
Sara

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [September 30, 2019, 2:52pm UTC](https://discuss.workflowgen.com/t/dropdown-liste-databinding/1495/4 "2019-09-30T14:52:56Z")

</div>

Hi @sara,

If your global lists are structured similarly to the example I provided, there is no need to perform a join.

If your databind requires complex queries. I recommend doing the databind in code behind.

You can retrieve the global list values in code like this:

```auto
WorkflowGen.My.Integration.GlobalLists gl = new WorkflowGen.My.Integration.GlobalLists();
System.Data.DataTable GLOBAL_LIST_DATA;
GLOBAL_LIST_DATA = gl.fetchList("GLOBAL_LIST_NAME", "Column1,Column2", "en-US", true);
foreach (System.Data.DataRow row in GLOBAL_LIST_DATA.Rows){
    ...
}

```

Eddy.

---

<div class="post-metadata">

**Author:** ![sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@sara](https://discuss.workflowgen.com/u/sara)\
**Post date:** [September 30, 2019, 3:03pm UTC](https://discuss.workflowgen.com/t/dropdown-liste-databinding/1495/5 "2019-09-30T15:03:10Z")

</div>

Hi,  
The problem that I have is that when I select the first Value in the first dropdown List I get the correct result but when I change the value I get the first result + the correct result . It seems Like the second Dropdwonlist is not cleared after choosing an item in the first one .

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [October 15, 2019, 6:56pm UTC](https://discuss.workflowgen.com/t/dropdown-liste-databinding/1495/6 "2019-10-15T18:56:41Z")

</div>

Hi @sara,

You can uncheck the option **Append data bound items** to avoid this behaviour.

 ![Inkedb83e1d9420181e42f9238e2d23a01d9c12fa216e_LI](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/6bbc07bd9f0106c7fcb5e97c646f6af9b3ba3ec3.jpeg)

Regards,  
Eddy.

---

<div class="post-metadata">

**Author:** ![sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@sara](https://discuss.workflowgen.com/u/sara)\
**Post date:** [October 28, 2019, 10:42am UTC](https://discuss.workflowgen.com/t/dropdown-liste-databinding/1495/7 "2019-10-28T10:42:46Z")

</div>

Hello,

Thanks Eddy.

Best Regards,

---

<div class="post-metadata">

**Author:** ![Anil.M](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Anil.M](https://discuss.workflowgen.com/u/Anil.M)\
**Post date:** [June 25, 2025, 6:47am UTC](https://discuss.workflowgen.com/t/dropdown-liste-databinding/1495/8 "2025-06-25T06:47:47Z")

</div>

Hi  
I have two dropdowns in grid view first dropdown is x and second dropdown is y When I select a x from the global list, the form displays multiple dropdown entries with the same values (e.g., a, a and b, b, b, …) the values same in global list also but i want unique values based on x dropdown i have to fill y drop down. global list columns D, E, values a,1 and a, 2 and b,5 and b, 6 like that
