Combine input from multiple dropdowns into a text field

Hi, newbie here. I have several dropdowns with their respective values derived from a database (one type for each dropdown). I want to populate a single text/input field based on the aggregate input of all of the dropdowns, but I want to find values from different multiple fields for all the types in the database.

Like this:

  • User selects [dropdown value 1A] [dropdown value 2A] [dropdown value 3A]
  • Text/input field returns [value 1B] [value 1C] [value 2B] [value 2C] [value 3B] [value 3C]

I also want a condition that applies only if a toggle (next to each dropdown) is set to “on”.

I feel lost and not sure which approach is the most effective, and where to begin. Doable? Thanks!

Hi there, @stefan.e… I could be way off base, but are you saying you want a text field to show all of the values that have not been selected from the dropdowns? It’s hard to follow your example, so it would probably help if you could share some screenshots or explain the situation with actual data.

Best…
Mike

Was just about to, see provided. Only show the values selected from the dropdowns. For instance, “Proactivity” dropdown value “Mentor” generates “[Proactivity: Mentor – ask questions and provide perspectives]” (sidenote: actually including the square brackets). In the example, the toggle for “Conciseness” is untoggled, which excludes that option from the generated text.

I can all but guarantee that what you want to do is possible, but I still don’t really understand it. Why are Area and Character showing a value in the text field when nothing has been selected in those dropdowns? And where does “ask questions and provide perspectives” come from when “Mentor” is selected from the Proactivity dropdown?

Appreciate your effort. I took the screenshot at different times, have updated it now to reduce ambiguity. So the text will be generated based on the dropdown as shown now. As for the “ask questions…” that should be an entry in the database mapped to the dropdown value, that the text fields collects. At least that’s my hypothesis.

Hi @stefan.e ,

Seems like a unique case but it can definitely be done using states!
Frontend Setup

  1. Add 3 states to the group holding all the input fields together (or a group that you find most relevant).
  2. Make each state the same data type as each dropdown field.
  3. Make each of these states a list.
  4. Create a workflow → “when input’s value is changed” → set state of (above element you put the state on) → make the state = do search for:Character:minus item: this dropdown’s value
    Repeat this for each dropdown input
    You can add an additional conditional logic to this workflow “when toggle X is checked”

Now you should have each state holding all the fields besides what’s selected in the dropdown.

  1. Go to the text input field and make the initial/default content equal to the states you’ve set above.

I hope this helps enough to at least get you on the right track!

1 Like

I am definitely not smart enough to follow @Dillon_Schade’s write-up (and I read it three times), but I do have a working example that uses two option sets and two custom states per category to produce this.

So, if I have understood your post correctly, what you are trying to do is possible, and if you want some details from my example, just let me know.

1 Like

Thanks. You lost me at 4, see screenshot. Not following exactly, the options don’t seem available to me. Can’t find or understand what you mean by “make the state”. What’s the exact workflow and instructions here to make it work?

That’s awesome. I’ve built the dropdowns by referring to a regular database, so I’d have to change it to option sets. I also want to future-proof the setup by allowing users to add their own inputs later on, which excludes option sets as an option for now.

1 Like

Click the “Click” area to the right of “Value”.

If the data you’re searching through is an option set, then you can select “All Areas”. This will give you a list of areas. Then you’d want to subtract the areas you don’t want to be in that list.

If the data you’re searching through is no an option set, then you’ll need to do a “do search for” as laid out above.

That made it clearer. Still not generating results. It’s not an option set so I’m going for the original suggestion with “do search”. But I get an error when I try entering the value, not sure where the problem is.

Some additional questions to help me understand the logic:

  • Are you saying I should create a new state in the workflow, aside from the one already created -steps 1-3?
  • Why save 1-3 as a list?
  • What does the “:minus” accomplish?

Hey @stefan.e,

is this what you are trying to achieve? if yes, then it requires several workflows for each toggle and dropdown to make it work since each toggle can add/remove a value and each dropdown can add or change the existing value. Here’s the editor link if you’d like to see the workflows.

The custom state should be a list to be able to show/hide items if the toggle is OFF.

Though this method is not practical or scalable since it requires 5 workflows per dropdown :expressionless: but I guess it’s one way to do it?

let me know if you need help?

Thanks for the effort! It looks great and is nearly there.

I will initially have 12 dropdowns and 12+9 toggles, so it’s not super scalable it seems.

Additionally, the text needs to be generated in the exact order as the dropdown fields, [area] for instance always needs to come first. As of now if i check and uncheck a toggle, the results is moved to the end of the text fields.

Edit: Figured it out, just need to assign multiple states, one for each category and then retrieve them in the text field in the right order.

oh dear this will definitely not work then :rofl: glad you figured it out eventually. But how will the empty values be represented in the field? will they be always visible?