Creating a Thing from a Multi-dropdown


I am trying to get the data from a multi-dropdown input on a form into a Thing. I’d like this data to end up in this format: [Recursos Humanos, Operación]. Just separated with commas

Has anyone used this input to pass data to Things?

Thanks for any help!


Sure, that’s just:

Multidropdown's value

:point_up_2: this is a list of the same datatype as the Multidropdown’s “Type of Choices”.

E.g., If your multidropdown is configured like this:

Multidropdown SECTOR's value is a list of type Industry Sector.

(Of course, if there are no selections, that list will have no items in it – it will be a zero-length list. If there are one of more selections then the list will have that many items in it. You can check if a selection has been made by Multidropdown SECTOR'S value:count > 0 or by Multidropdown SECTOR's value: first item is not empty :point_left: either of those conditions will be true/yes if a selection has been made.)

Continuing on: The tags you see in the Multidropdown come from “Option caption” (refer to screenshot above – there, my option caption is coming from the Name field). Those will be of type text of course.

If you want a joined list of texts representing those tags, you can do:

Multidropdown SECTOR's value's Name

:point_up_2: this will be a comma separated list of the Names displayed in the multidropdown’s selection (it might look like “accounting, jet propulsion, medicine”.

If you desired a different separator than comma, you could do:

Multidropdown SECTOR's value's Name :joined with "some other string"

e.g., Multidropdown SECTOR's value's Name :joined with | "

would yield us something like “accounting | jet propulsion | medicine”.

Worked perfect. Thanks a lot, @keith!

1 Like