Custom Picker - suggestFunction is executed twice for each Keystroke

Hello All,

In 19.1 we observed that the custom picker suggest function is evaluated twice for each keystroke.

We have a web service integration in the suggest function to search data. (This can be observed in performance view)

This behavior is making duplicate calls to the service and increasing the load time of the custom picker.

I think the same behavior will be observed for database calls. 

Does anyone know how to make it evaluate once per click?

Note: We already limited the web service invocation only after two key strokes..

  Discussion posts and replies are publicly visible

Parents Reply
  • This function is used only in the suggestFunction for custom picker.

    Below is a very simple code sample. Please find sample code.

    load(
    local!value,
    {
    a!pickerFieldCustom(
    label: "Custom Picker",
    labelPosition: "ABOVE",
    suggestFunction: rule!CM_suggestFunction(filter:_),
    selectedLabels: local!value,
    value:local!value,
    saveInto: {},
    validations: {}
    )
    }
    )

    SugestFunction:CM_suggestFunction

    /* A web service will be called here */
    a!dataSubset(
    data:"Some Data",
    identifiers:"Some Data"
    )

    Check the count of the CM_suggestFunction in performance view after more than key stroke.

Children
No Data