Dropdown/custom picker (to utilize auto suggestions) with the option to enter new values?

Hello,

I'm looking for an text field (user input) which will auto suggest values (based on a database field). Afaik, that is something dropdown fields and with some more logical a customer picker can provide except they wont allow for new values to be entered.

What would be a good way (if any) to achieve this?

  Discussion posts and replies are publicly visible

Parents Reply Children
  • Yes, but I'm not sure if my usecase fit yours. I've adopted the pattern a bit

    That's is the search function (with the keyword (or filter) added to the result):

    a!localVariables(
      local!matches: where(
        a!forEach(
          items: ri!labels, 
          expression: search( ri!filter, fv!item)
        )
      ),
      a!dataSubset(
        data: union(index( ri!labels, local!matches), ri!filter), 
        identifiers: union(index( ri!labels, local!matches), ri!filter)
      )
    )

    Finally, I did not need to add the keyword to the customer picker because I was looking for a single value, so putting the result of the customer picker in a local variable was just fine for me:

    a!pickerFieldCustom(
      label: "Country",
      labelPosition: "ADJACENT",
      maxSelections: 1,
      suggestFunction: rule!ucArrayPickerFilter(
        filter:_,
        labels: local!countryList
      ),
      selectedLabels: local!selCountry,
      value: local!selCountry,
      saveInto: local!selCountry,
      required: true
    )