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
  • Note that the suggest function needs to return a datasubset. So if you're using a query rule that returns just the array of data, you'll need to wrap that in an expression that returns a datasubset. So the rule in your suggest function would be soemthing like this:

    with(local!data: rule!myQuery(ri!input), a!datasubset(data: local!data, identifiers: index(local!data, "id", {})))
Reply
  • Note that the suggest function needs to return a datasubset. So if you're using a query rule that returns just the array of data, you'll need to wrap that in an expression that returns a datasubset. So the rule in your suggest function would be soemthing like this:

    with(local!data: rule!myQuery(ri!input), a!datasubset(data: local!data, identifiers: index(local!data, "id", {})))
Children
No Data