Hi All,I have below requirement where Pickerfield to start search only when user enters more than 4 characters, else it should not search in the background. Appreciate your response here. Thank you !
Discussion posts and replies are publicly visible
Hello Vamsy,
Please add that condition in the suggest function stating that it should show search results when user enters more than 4 characters.
if(len(ri!search)<=4, todatasubset({}), {-- your code})
Hi VInay,Appreciate your time and response. However, my picker fields input is not coming from ruleInput. It will be as part of userInput in the pickerfield component.
example:
a!pickerFieldCustom( label: "States", instructions: "Enter the employee's state of residence.", maxSelections: 1, suggestFunction: rule!ucArrayPickerFilter( filter: _ ), value: local!pickedState, saveInto: local!pickedState, showWhen: local!showPicker )
So my search should happen only when user input has more than 3 characters.
If that is the case you can modify your suggestFunction or you can create your own expression for that rule which would help in your case.
The suggestion above is actually to update your rule ucArrayPickerFilter(), not the main function.