# Dropdown Options

**URL:** <https://forum.inductiveautomation.com/t/dropdown-options/83577>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 28, 2023, 6:09pm UTC](https://forum.inductiveautomation.com/t/dropdown-options/83577 "2023-12-28T18:09:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HelloWorld](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HelloWorld](https://forum.inductiveautomation.com/u/HelloWorld)\
**Post date:** [December 28, 2023, 6:09pm UTC](https://forum.inductiveautomation.com/t/dropdown-options/83577/1 "2023-12-28T18:09:55Z")

</div>

Lets say I have a dropdown - the options are bound to a named query that returns 3 columns. I have columns ID, x, y. Is there a way to have x,y show up on each option together?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 28, 2023, 6:18pm UTC](https://forum.inductiveautomation.com/t/dropdown-options/83577/2 "2023-12-28T18:18:27Z")

</div>

You'll need a transform of some kind. Vision or Perspective?

---

<div class="post-metadata">

**Author:** ![HelloWorld](https://avatars.discourse-cdn.com/v4/letter/h/b782af/32.png) [@HelloWorld](https://forum.inductiveautomation.com/u/HelloWorld)\
**Post date:** [December 28, 2023, 6:34pm UTC](https://forum.inductiveautomation.com/t/dropdown-options/83577/3 "2023-12-28T18:34:16Z")

</div>

Perspective

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 28, 2023, 6:46pm UTC](https://forum.inductiveautomation.com/t/dropdown-options/83577/4 "2023-12-28T18:46:36Z")

</div>

Why not do a separate named query for the dropdown and use the `concat()` function to create the labels? e.g.,

```auto
SELECT ID as value,
       CONCAT(x, " ", y) AS label
FROM ...

```

Then bind the dropdown's `props.options` to that named query.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [December 28, 2023, 6:56pm UTC](https://forum.inductiveautomation.com/t/dropdown-options/83577/5 "2023-12-28T18:56:19Z")

</div>

Going the pure Binding/Transform route:

```auto
# This example uses an incoming JSON query value with known columns of "id", "name", and "quantity".
# Adjust for your scenario. Remember to adjust for potential TypeErrors.
def transform(self, value, quality, timestamp):
	options = []
	for option in value:
		options.append({"label": " ".join([option.name, str(option.quantity)]), "value": option.id})
	return options

```
