Hello everyone,
I encounter a weird problem (bug ?) with expression based user filter on record list : I created a rule that works just fine on any environment, any record and any text field, except with data that begins with the letter "T" !Do you have the same behavior ?
1. The Setup
I created an expression rule (called "AMO_RecordFilterList") to call when setting a record user filter.The rule inputs are :
The rule is :
a!localVariables( local!filtre_list: a!queryEntity( entity: ri!entity, query: a!query( aggregation: a!queryAggregation( aggregationColumns: { a!queryAggregationColumn( field: ri!field, isGrouping: true ) } ), pagingInfo: a!pagingInfo( 1, - 1, a!sortInfo( ri!field, true ) ) ), fetchTotalCount: true ), a!recordFilterList( name: ri!title, options: { a!forEach( items: local!filtre_list, expression : a!recordFilterListOption( id: fv!index, name: if( or(isnull(index(fv!item,ri!field)),index(fv!item,ri!field)=""), "(vide)", index(fv!item,ri!field) ), filter: a!queryFilter( field: ri!field, operator: if( or(isnull(index(fv!item,ri!field)),index(fv!item,ri!field)=""), "is null", "=" ), value: if( or(index(fv!item,ri!field),index(fv!item,ri!field)), null, index(fv!item,ri!field) ) ) ) ) }, allowMultipleSelections: if(isnull(ri!allowMultipleSelections),true(), ri!allowMultipleSelections) ) )
2. The use
In a Record User Filters configuration, I call this rule and give it my rule inputs :
The user filter works fine...
... and returns the expected lines :
3. The Problem
This rule works fine in any environement, with any record and any field except with records which data text field begins with the letter "T" (upper case or not)
After a few investigations :
I came with the "T" issue after using that same rule in another environement and having exactly the same problem.
Does anyone reproduces the problem and have any insight ?
(thank you for reading me this far !)
Discussion posts and replies are publicly visible
Fneup said:or(index(fv!item,ri!field),index(fv!item,ri!field))
This line (the value parameter) doesn't look right to me. You have a logical condition, but it isn't actually comparing to anything. Generally if you have a parameter that expects a boolean, any text value that starts with "T" will return true and any other string returns false.
I'm guessing that this line should match the one a few lines above that is testing if it is null or empty.
Peter Lewis Thank you so much, you nailed it.