Combination of OData filter functions (replace inside startswith)
Posted: 20 Jul 2018
Hi,
we've to a column with chapter numbers. This column is formated as s string and is designt to extend the numbers with leading spaces, so each chapter / subchapter is 4 chars log.
e.g.: " 3. 2. 1."
if i want to filter by chapter and "startswith", the user has to insert the spaces in the csl as well....
OData offers a function "replace". So i thought i can use something like:
startswith(replace(Chapter,' ',''),'" + encodeURIComponent(term) + "')
but this only results in an error.
How can i filter and ignore whitespaces?
we've to a column with chapter numbers. This column is formated as s string and is designt to extend the numbers with leading spaces, so each chapter / subchapter is 4 chars log.
e.g.: " 3. 2. 1."
if i want to filter by chapter and "startswith", the user has to insert the spaces in the csl as well....
OData offers a function "replace". So i thought i can use something like:
startswith(replace(Chapter,' ',''),'" + encodeURIComponent(term) + "')
but this only results in an error.
How can i filter and ignore whitespaces?