Do you support concat as a filter?
bstaley opened this issue · 2 comments
bstaley commented
Is it possible to use concat as a filter? If you do and there is some documentation, can you point me to it?
bstaley commented
I have this
context.Contacts.filter(
'it.FirstName.concat(it.LastName,' ').contains(searchText)',
{searchText:searchInput.value}
)
and it almost works. If I search with 'John Thomas' it returns no results but if i search with 'JohnThomas' (excluding the single space) it will pull back the record.
Can someone confirm? I'm thinking this is a bug; either that or I'm just using it wrong.
bstaley commented
Changed up my query a little and got it to work with the following
context.Contacts.filter(
'it.FirstName.concat(" ").concat(it.LastName).contains(searchText)',
{searchText:searchInput.value}
)
the filtered url becomes this
$filter=contains(concat(concat(FirstName,' '),LastName),'John Thomas')