# fill a dropdown at runtime ?

**URL:** <https://www.dynamicsuser.net/t/fill-a-dropdown-at-runtime/5578>\
**Category:** Developers Forum\
**Created:** [December 12, 2001, 3:16pm UTC](https://www.dynamicsuser.net/t/fill-a-dropdown-at-runtime/5578 "2001-12-12T15:16:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pduck](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@pduck](https://www.dynamicsuser.net/u/pduck)\
**Post date:** [December 12, 2001, 3:16pm UTC](https://www.dynamicsuser.net/t/fill-a-dropdown-at-runtime/5578/1 "2001-12-12T15:16:03Z")

</div>

hello here i am again 🙂 does anybody know a possibilty to fill an option string during runtime so i can change the values shown by a dropdown box on a form ? i want that after my user chooses a field in another box (most option-fields) he 'll get another field in which he can choose the possible values for this field … \*\*\* quack \*\*\*

---

<div class="post-metadata">

**Author:** ![lars\_westman](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lars\_westman](https://www.dynamicsuser.net/u/lars_westman)\
**Post date:** [December 12, 2001, 6:32pm UTC](https://www.dynamicsuser.net/t/fill-a-dropdown-at-runtime/5578/2 "2001-12-12T18:32:00Z")

</div>

You can’t do this with option fields. Instead You can do it by applying filters depending on the Users choice and then use the filtered record in IF FORM.RUN(FORM::[Formname],FilterRecord) = Action::LookupOK THEN //Lars

---

<div class="post-metadata">

**Author:** ![Tarek\_Demiati](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@Tarek\_Demiati](https://www.dynamicsuser.net/u/Tarek_Demiati)\
**Post date:** [December 12, 2001, 7:19pm UTC](https://www.dynamicsuser.net/t/fill-a-dropdown-at-runtime/5578/3 "2001-12-12T19:19:46Z")

</div>

Alex : Just a work around : - Fill a temporary table instead - Put your code which launch the form on the OnDrillDown() Trigger of your control ###### **[tarek\_demiati@ureach.com](mailto:tarek_demiati@ureach.com)**

---

<div class="post-metadata">

**Author:** ![pduck](https://avatars.discourse-cdn.com/v4/letter/p/e68b1a/32.png) [@pduck](https://www.dynamicsuser.net/u/pduck)\
**Post date:** [December 13, 2001, 7:08am UTC](https://www.dynamicsuser.net/t/fill-a-dropdown-at-runtime/5578/4 "2001-12-13T07:08:53Z")

</div>

yap i am trying a solution with a table and filter and so on … a temporary table would be more nice 🙂 … but how i understood a temporary table /record must depend on a exisiting table or ? \*\*\* quack \*\*\*

---

<div class="post-metadata">

**Author:** ![Tarek\_Demiati](https://avatars.discourse-cdn.com/v4/letter/t/f6c823/32.png) [@Tarek\_Demiati](https://www.dynamicsuser.net/u/Tarek_Demiati)\
**Post date:** [December 13, 2001, 7:36am UTC](https://www.dynamicsuser.net/t/fill-a-dropdown-at-runtime/5578/5 "2001-12-13T07:36:00Z")

</div>

Yes temporary table must depend on an existing table. Your temporary table will inherit all the triggers, keys, propertie, … of your actual table So you can VALIDATE, fire triggers, set the keys, etc,etc… ###### **[tarek\_demiati@ureach.com](mailto:tarek_demiati@ureach.com)**

---

<div class="post-metadata">

**Author:** ![apertierra](https://avatars.discourse-cdn.com/v4/letter/a/bcef8e/32.png) [@apertierra](https://www.dynamicsuser.net/u/apertierra)\
**Post date:** [December 18, 2001, 7:07pm UTC](https://www.dynamicsuser.net/t/fill-a-dropdown-at-runtime/5578/6 "2001-12-18T19:07:51Z")

</div>

Easy solution with just a bit of code: Create the different option dropdown boxes and hide the ones that are not being shown by default… on aftervalidate of the box, set the visible property on the other ones for showing just the ones you’re wanting to… (you can put a box over another one and just show the one you’re wanting to). Use a function to set the values on the record properly… Regards, Alfonso Pertierra (Spain)apertierra@teleline.es
