Hello All, Does anyone have any experience with the a!pickerFieldCustom com

Certified Associate Developer
Hello All,
Does anyone have any experience with the a!pickerFieldCustom component? I'm using an expression that wraps an a!queryRecord call however using this as the suggestFunction returns all records regardless of input. However testing my query expression directly returns the filtered results as expected.

I'm only encountering this problem when using an expression as the suggestFunction - using a query rule for the suggestFunction works as expected.

Even more perplexing is that when I supply a fixed argument to the suggest function (eg: suggestFunction: rule!myQuery("test") returns no results at all when, again, testing the query function directly returns results as expected.

OriginalPostID-148922

OriginalPostID-148922

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Associate Developer
    Thanks - for future people searching and finding this post with the same problem the issue was that my query expression was using a load() instead of a with(). The a!picker element doesn't initialize a new context for the suggestFunction with every call and thus the first query, with all the results, was being carried over for all subsequent queries and never being executed again.
Reply
  • 0
    Certified Associate Developer
    Thanks - for future people searching and finding this post with the same problem the issue was that my query expression was using a load() instead of a with(). The a!picker element doesn't initialize a new context for the suggestFunction with every call and thus the first query, with all the results, was being carried over for all subsequent queries and never being executed again.
Children
No Data