Dropdown input fields with values from bucket

Hello,

I normally use hard codes Dropdown values for these input fields because I can specify Label, Value and a default.

When I use values from a bucket, I only see the value, e.g. yes, no from the sendData code below.

Is there a way to add Labels and ideally a default to the bucket entries (perhaps in metadata) that provides the same functionality as the hard coded dropdown items?

const device = new Device({ token: “token…” })

await device.sendData([{

variable: “yesno”,

value: “yes”

},{

variable: “yesno”,

value: “no”

}])

Thanks

Gary

Hi,

I’d like to inform you that you have the option to enhance the appearance of your dropdown by enabling the “show label in bold” feature in the dropdown’s Options.

By utilizing metadata or labels when saving your data, your dropdown will effectively display the corresponding label values, providing a more organized and clear user experience.

await device.sendData([{variable: "yesno",value: "ID_VALUE",metadata: {label: "yes",},},]);

Thank you Mateus. I also notice the drop down items are sorted alphabetically which is a bonus for using this method.