Common issue in Select and Type-and-search elements

  1. Dropdown is not shown in Select and Type-and-search elements.
  2. Value from API response is not populated in the Select/ Type-and-search field.
  3. Cannot set default value for Select and Type-and-search elements.
18 Likes

Dropdown is not shown in Select and Type-and-search elements

  1. For Select and Type-and-Search elements to show values in dropdown, the datasource must be in code value array format. For eg. [{“code”:1,“value”:“Maharashtra”}, {“code”:2,“value”:“Kerala”}, {“code”:3,“value”:“Gujarat”}, {“code”:4,“value”:“Other”}]
  2. The dropdown will not be populated if the datasource is in string. It must be an array of code value pairs.

Value from API response is not populated in the field

  1. The API response must be in code value format. If the value is in string, it will not populate on the field.
  2. The code & value of the response must match to the code & value in the options of the dropdown.
  3. The datapath for the below response will be getVal(‘1633507306579967.select_industry’)
  4. Do not add .value after select_industry in the datapath.

Cannot set default value for select and Type-and-search elements

  1. To set the default value of a select/type-and-search element, enter the default value in code-value pair instead of string. For eg. {“code”:1,“value”:“Maharashtra”}
21 Likes