0
votes

I have odata url and want to pass $filter values from array in logic app.

I have used HTTP connector to call odata api.

when in filter i passed one value it is working fine.

"$filter": "mynumer eq '1122'

but i want to pass all values at one in one $filter from string array

I tried like -

"$filter": "mynumer in ('1122','1133') but getting below error

403 - Forbidden: Access is denied.

variable('myarray') = ['1122','1133']

want to pass variable('myarray') to $filter how can i achieve this?

enter image description here

we can able to pass like this -

(mynumer eq '1122') or (mynumer eq '1133') but how to generate this based on array variable values?

2

2 Answers

1
votes

Try passing it as shown below:

"$filter": "FirstName eq '@{variables('MyVar')[0]}' or FirstName eq '@{variables('MyVar')[1]}'"

Example That I tried:

enter image description here

enter image description here

0
votes

With OData 4.01, in statement is supported like this:

http://host/service/Products?$filter=Name in ('Milk', 'Cheese')

In your issue, you need use "$filter": "mynumer in (1122,1133)" while the number is int.