Prepopulating dynamic dropdown with previously stored response

HI all,

I have a dynamic dropdown selection input value that gets stored in a table called “provider type”. The “types” of providers are pulled from on Option Set.

I’m trying to build an “edit” pop-up that allows a user to change what was previously chosen and stored. So for example, if a user initially selects an option and hits enter, that value gets stored and displayed in a table.

My problem is that when I trigger a popup by clicking an “edit” icon I can prepopulate with that Parent’s value for every input field on the original form, but can’t figure out how to get the prepopulated value of the dropdown selection to display.

I want the original option set to still provide the options for the dropdown in the edit pop-up, but I want the data to prepopulate with their original selection from the “provider” table where that selection was stored.

In the default value, just enter the value you want the dropdown to display.

Obviously, it must be of the same type as the dropdown, and it must be one of the choices in the choices source.

The fact the expression is red, means your expression is not currently the correct type.

I don’t know the value they would have selected from the original input. So let’s say orginally they selected “Doctor” as the provider type from the input dropdown. That value gets stored in a table. How do I pull up that previously selected value so they can see what they entered before and can then opt to change it?

I’ve tried setting the data type to the option set “provider OS” and just the stored data type “provider”, but neither seems to work.

Exactly the same way you’ve done it for all the other inputs (a dropdown is no different).

yeah, that’s what I thought, but it doesn’t seem to work for another dropdown. Just to be clear the workflow is:

  1. For a new entry, the user would select a ‘provider type’ from the option set list in the dropdown. The option set I’ve titled “providers OS”.
  2. Then they decide they want to change the value later, so they click on the pencil icon to edit the entry they already stored in a table called “providers”.
  3. A popup now displays everything they previously entered for that entry form just fine (name, email, etc.). (e.g. Type of Content = Providers; Data source = Parent group’s providers).

the only thing that won’t prepopulate with the stored value is the dropdown list value. I’ve tried setting the Type of content to Provider OS or Provider and neither seems to work like it did for the other fields.

Well that’s how you do it.

Like I said, the expression is red because of a type mismatch.

The issue checker will tell you exactly what the issue is (but it’s obviously a type mismatch).

So I resolved the red type mismatch by storing the orginal selection from the user in a field type Option Set (I had previously stored it as text).

However, the prior selection still does not show up in the edit pop-up field.

Ok. So I solved the issue. I’m not sure exactly why it worked entirely though :smile:

  1. I had to store the input from the dropdown list from the orginal form in a data type of ‘Option Set’. (note: I used an OS to create the dropdown list items, but had originally stored the value as “text”…so that’s why it was red above.)

This got rid of the errors, but it still didn’t work. So I had to…

  1. on the “edit” pop-up, where I was trying to present the stored data from the inputs above, I needed to set my groups the following:
    But what I didn’t realize is that my UI had the dropdown element inside 2 groups. So both groups had to be set this way. Not just the immediate group the element was inside.

But if just the inner group was set this way, no error was produced, but it didn’t work.