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]
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.
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.
Seems like a unique case but it can definitely be done using states! Frontend Setup
Add 3 states to the group holding all the input fields together (or a group that you find most relevant).
Make each state the same data type as each dropdown field.
Make each of these states a list.
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.
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!
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.
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.
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?
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 but I guess itâs one way to do it?
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 glad you figured it out eventually. But how will the empty values be represented in the field? will they be always visible?