What should be the operator/syntax if I want to filter out something that does NOT ends with certain value. I tried @doesnotend,
not(endswith.. ) But I am always getting errors that the query is invalid. Basically I want to opposite of result of @endswith(item()?['{VersionNumber}'], '.0')
Solved! Go to Solution.
Use
@not(endsWith(item()?['VersionNumber'], '.0'))
If you get an error show it here please.
Use
@not(endsWith(item()?['VersionNumber'], '.0'))
If you get an error show it here please.
I tried what you suggested but got the following error
The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@not(endsWith(item()?['VersionNumber'], '.0'))' failed: 'The template language function 'endsWith' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#endswith for usage details.'.
Use this:
if(empty(item()?['VersionNumber']),false,not(endsWith(item()?['VersionNumber'], '.0')))
Hello again, this time I wasn't able to save the expression the error was
Flow save failed with code 'WorkflowRunActionInputsInvalidProperty' and message 'The 'inputs' of workflow run action 'Filter_array' of type 'Query' is not valid. Property 'where' must be a template language expression.'.
So It turns out that your initial suggestion was almost right, that's why I marked it as solution. We were missing the {}
@not(endsWith(item()?['VersionNumber'], '.0'))
@not(endswith(item()?['{VersionNumber}'], '.0'))