Hi,
I have written an userfiler insider a RecordType with an expresson.
When I try to use the filter in the user interface and after selecting the item from the dropdown, I am getting an error below in the below attached 2nd screen shot.
Any advises please.
I am getting an error like below
Discussion posts and replies are publicly visible
The "in" operator expects a list of values. You provide a single value. Try to use the "=" operator.
Either do what Stefen said or pass in value like this { fv!item.id}.Tip: I generally create query with operator as IN always, so that in future we don't have to worry if the passed parameter changed to multiple
I am getting same type of error even after using "=" operator.
You need to make sure that the data type matches. If this is an integer in DB, try a toInteger() on the value.
I tried with Operator "in" and "=", still getting same error.
Please find the below lines of code which I used inside RecordType userfilter configuration.
a!localVariables( local!attorneys: rule!LCM_getAttorneys(soeid: null, attorneykey: null()), a!recordFilterList( name: "Attorneys", options: a!forEach( items: local!attorneys, expression: a!recordFilterListOption( id: fv!item.attorneykey, name: fv!item.name, filter: a!queryFilter( Field: 'recordType!{53d820bb-ea8a-4eb8-be61-11f5d777ee73}LCM.relationships.{7284648d-721f-4542-b1be-33ec9de327a9}recordattorneys.relationships.{fa2cff10-cacd-45cf-80a9-9c281abc512c}attorneys.fields.{6b8c7aae-1e6d-4313-9ced-93ccaed0d5da}attorneykey', operator: "=", value: {fv!item.id} ) ) ) ))
here fv!item.id means local!attorneys.id
So is that multiple type?
This is user filter dropdown with multi selection.
Why do you wrap fv!item.id into curly brackets? This makes it a list. Comparing that using the "=" operator will fail.
Either use "in" and a list as value, or "=" and a single value. And make sure that the data types match.
If multiple then make it in operator. its simple logicif value to be passed is single then use "=" else use "in"