Skip to main content
June 13, 2024
Question

dropdown search box find incorrect values

  • June 13, 2024
  • 5 replies
  • 0 views

Hi,

I am using a dropdown with values retrieved from a record. The record only has the identifier field and a text field. The issue is that when using the search option, it finds values that do not match exactly what is typed in the dropdown search box.

For example, I type part of the name of one of the records ("real") and it correctly shows only one matching result, "LOREAL EUROPE SUCURSAL ENESPAÑA." However, if I add one more letter ("reald"), the results change and show two results that do not exactly match what I am looking for: "INDUSTRIA CORE ESPAÑOLA DE MODA" and "NEW ERA REMARK LIMITED". I understand that it shows these values due to the following,

"INDUSTRIA CORE ESPAÑOLA DE MODA" and "NEW ERA REMARK LIMITED". If I add an "a" -> "realda", it only shows "INDUSTRIA CORE ESPAÑOLA DE MODA".

Isn't there a way for it to search only for results that exactly contain what I am typing?

Thank you very much.

5 replies

stefanhelzle0001
June 13, 2024

Did you consider to open a support case to report this.

June 13, 2024

I'm afraid I'll have to open a support case as you suggest.

Thanks!

jayaprakashr0001
Participating Frequently
June 13, 2024

Hi [mention:99e1c8d2944b494fa1d7120e123caa92:e9ed411860ed4f2ba0265705b8793d05] ,

You can try with custom picker field. It will solve your issue.

rule!TR_Test()

a!localVariables(
  local!data: {
    "LOREAL EUROPE SUCURSAL ENESPAÑA.",
    "INDUSTRIA CORE ESPAÑOLA DE MODA",
    "NEW ERA REMARK LIMITED",
    
  },
  local!result: if(
    a!isNotNullOrEmpty(ri!txt),
    where(
      a!forEach(
        items: local!data,
        expression: search(ri!txt, fv!item)
      )
    ),
    ""
  ),
  local!outdata: index(local!data, local!result, null),
  a!dataSubset(
    data: local!outdata,
    identifiers: local!data
  ),
  
)

a!localVariables(
  local!value,
  {
    a!pickerFieldCustom(
      label: "Custom Picker",
      labelPosition: "ABOVE",
      placeholder: "search",
      suggestFunction:rule!TR_Test(txt:  _,),
      selectedLabels: local!value,
      value: local!value,
      saveInto: local!value,
      validations: {}
    )
  }
)

June 13, 2024

Hi [mention:44bed26f1d96482687e4003414c7d8ec:e9ed411860ed4f2ba0265705b8793d05] 

It would be a perfect workaround, but unfortunately, we need it to be a dropdown list due to client requirements.

Thank you!

jayaprakashr0001
Participating Frequently
June 13, 2024

AFAIK in drop down it's not possible