= with( local!hasTextValues: and( rule!GLOB_isValueNotNull( ri!values) , length( ri!values ) > 0), local!hasDateValues: and( rule!GLOB_isValueNotNull(ri!dateValues_date) , length( ri!dateValues_date ) > 0 ) , local!hasIntegerValues: and( rule!GLOB_isValueNotNull(ri!integerValues_int), length( ri!integerValues_int ) > 0), /* textField( value: */ apply( a!queryFilter( field: _, operator: _, value: _ ), merge( append( if( local!hasTextValues, index( ri!fields_txt, difference( rule!GLOB_createArray( count( ri!values ) ), wherecontains( { null() }, ri!values ) ) ), {} ), if( local!hasDateValues, index( ri!dateFields_txt, difference( rule!GLOB_createArray( count( ri!dateValues_date ) ), wherecontains( { todate( null() ) }, ri!dateValues_date ) ) ), {} ), if( local!hasIntegerValues, index( ri!integerFields_txt, difference( rule!GLOB_createArray( count( ri!integerValues_int ) ), wherecontains( { tointeger( null() ) }, ri!integerValues_int ) ) ), {} ) ), append( if( local!hasTextValues, index( ri!operators_txt, difference( rule!GLOB_createArray( count( ri!values ) ), wherecontains( { null() }, ri!values ) ) ), {} ), if( local!hasDateValues, index( ri!dateOperators_txt, difference( rule!GLOB_createArray( count( ri!dateValues_date ) ), wherecontains( { todate( null() ) }, ri!dateValues_date ) ) ), {} ), if( local!hasIntegerValues, index( ri!integerOperators_txt, difference( rule!GLOB_createArray( count( ri!integerValues_int ) ), wherecontains( { tointeger( null() ) }, ri!integerValues_int ) ) ), {} ) ), filter( rule!GLOB_isValueNotNull, { ri!values, ri!dateValues_date, ri!integerValues_int } ) ) ) /*)*/ )