Help using variable in odata filter

Hi,

I am trying to filter SharePoint for each list item by a variable determined in a previous sequence but it does not seem to work.

I have scoped the variable to the highest level it can be but it still does not work.

Is it even possible to use a variable as a filter?

Thanks in advance


variable in filter

1 Like

Hey @Blair_Forbes

I hope you are talking about this variable v_str_ItemID I don’t see any error on that.

If the scope is lesser or limited it will throw a compile error before you run.

May be the issue is with the variable value you are trying to pass which may not be with proper OData filter syntax.

Thanks
#nK

we would recommend follwoing:

  • check manually the Endpoint URL with hardcoded variable value
  • share the details of what you have done as we cannot see it from the screenshots e.g. the filter part

Hi,

Yes that is the variable I am using to filter. When I assigned the variable it did not set a value for some reason.

In the assign it is currently v_dict_ListFields("ItemID").ToString. ListFields being the parent dictionary.

But in the variables panel there is no value in the default value section.

1 Like

Hey @Blair_Forbes

You need to assign the filter variable value before For-Each please

And it should have a proper string representing the OData filter condition

Thanks
#nK

Hi,

I assigned the variable before the For Each but now there is an “For Each Item in List: Code: Item not found” error. Like the variable isn’t found, but I’ve just defined it…

1 Like

Could you please show us what’s the value you have assigned?

Thanks
#nK