cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cjs321
Helper II
Helper II

Sharepoint GetItems

Hi,

 

Please can you help me on an example syntax for the ODATA filter on the Sharepoint GetItems action?

 

I need to filter my sharepoint list to specific rows...

 

ie.. i have an expenses app (Created by me on powerapps) and i would like power automate to filter the Sharepoint Expenses list, based on whichever ExpenseNo (Unique number of each expense) is selected in my app.

 

I have so far created a variable which seems to be passing over to Power automate Correctly..but it seems to be invalid.

 

Here is my (example) syntax which comes out of the app...

ExpenseNo eq '1'and ExpenseNo eq '2'and ExpenseNo eq '3'and ExpenseNo eq

what would be the correct syntax?

 

Thankyou 🙂

 

Connor

1 ACCEPTED SOLUTION

Accepted Solutions
efialttes
Super User III
Super User III

Hi!

Let's start with the basics... how is your 'ExpenseNo' column defined in sharepoint? Number? Single line of text? Multichoice? Other?

Please share a screenshot from Comuln Configuration if possible.

 

Now, assuming single value, type number the expression example given does not make sense...

ExpenseNo eq '1'and ExpenseNo eq '2'and ExpenseNo eq '3'and ExpenseNo eq

...since a single item cannot hav several values '1', '2' and '3' at the same time. Now, if you need to get items with value 1 or value 2 or value 3, you need to use or operator instead

 

If single value, type number, I would try with the a simple expression, then increment complexity if need to search for several values:

ExpenseNo eq 1

 

But, the fastest way to deal with ODATA expresions is by temporarily remove them, then execute the flow for troubleshooting purposes, inspect flow execution, then review output from 'Get items' action block.

In 'Get items' output scroll to search for ExpenseNo Sharepoint internal name (95% of the times it is the same as displayed on the browser, but sometimes differ) then inspect value assigned (inside double quotes? no doublequotes? object? array?). If you need further assistance please share a screenshot from the outputs so we can see ExpenseNo related stuff

 

Thanx!

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

2 REPLIES 2
efialttes
Super User III
Super User III

Hi!

Let's start with the basics... how is your 'ExpenseNo' column defined in sharepoint? Number? Single line of text? Multichoice? Other?

Please share a screenshot from Comuln Configuration if possible.

 

Now, assuming single value, type number the expression example given does not make sense...

ExpenseNo eq '1'and ExpenseNo eq '2'and ExpenseNo eq '3'and ExpenseNo eq

...since a single item cannot hav several values '1', '2' and '3' at the same time. Now, if you need to get items with value 1 or value 2 or value 3, you need to use or operator instead

 

If single value, type number, I would try with the a simple expression, then increment complexity if need to search for several values:

ExpenseNo eq 1

 

But, the fastest way to deal with ODATA expresions is by temporarily remove them, then execute the flow for troubleshooting purposes, inspect flow execution, then review output from 'Get items' action block.

In 'Get items' output scroll to search for ExpenseNo Sharepoint internal name (95% of the times it is the same as displayed on the browser, but sometimes differ) then inspect value assigned (inside double quotes? no doublequotes? object? array?). If you need further assistance please share a screenshot from the outputs so we can see ExpenseNo related stuff

 

Thanx!

 

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

yashag2255
Dual Super User II
Dual Super User II

Hi @cjs321 

 

You can check this post out as well: https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/

 

Lots of coverage on odata queries. 

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (13,636)