Set default value in a drop down box

Set default value in a drop down box

Comments

  • Unknown
    edited November 2023

    Hi

    I have a drop down box in a form with items populated from a data query(‘List Input Source: DataName’ ).
    There is another data query which populates all the text fields in the form- I would like the text part of the dropdown box to show the data in this dataset as the default value.
    Is it possible to set a default value in a combo box? I can set a default value when the dowpdown box has a static list, but not when the items are from a dataset.
    Hope you can help.
    Please see example below: The form is populated from Query1 and DropDown box is populated from Query2, but I want to display ‘Code3’ as the default value in drop down box.
    Query 1 returns: Id=100, Team=Team1 and Code=Code3.

  • When you are setting up the drop down, there will be a field for Selected Item Data Name. Once you set a data name here, it will show up as an input to this form. If you pass Code3 into the selected item it will show up as the default. Let me know if you have any questions about getting this set up.

  • It looks like Data Name is accepting data from the dataset used to populate the drop down list, but not from another query. When trying to map the data field to the data name I am getting an error, even though both the fields are string data types.

    Please see example below: The form is populated from Query1 and DropDown box is populated from Query2, but I want to display ‘Code3’ as the default value in drop down box, which needs to come from Query 1.

    Query 1 returns: Id=100, Team=Team1 and Code=Code3.

  • I wanted to know how are you getting the value you want to be as default. Based on your screenshot and from what I understand in your description, I have created an example. The data from the first form is being passed to the second form. Since the drop down list and the selected item from the drop down list are two different mappings, using Select Value from Flow for each for the second form is possible. In this example, you would get the value of the first selected drop down item and map it to the selected drop down item in the second form.

  • Do you have your drop down taking in the complex type from your query as the type or is it just a string? If you are using the complex type, you will need to map between the type from query 1 and query 2 using build data on the input for your selected item. If you are using a string, you should be able to pass in the string value of each query into the form. Im happy to set up a call to take a look at this together if you would like.

Sign In or Register to comment.