cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
elaaadani
Helper V
Helper V

Problem with filtering ODATA on get items

Hello, good afternoon.
I am having problems with filtering information.
I am managing lists of more than 5000 data, so I need to use these filters.
My flow creates items inside folders in sharepoint list and after it creates the items, I get its ID to use it and attach documents associated with that item.
In that scenario, the flow runs automatically when a file is created on the server.

 

elaaadani_0-1618960380193.png

 


For the get items, I limit it with the name of the folder and subfolder where the item is located.

Folder 1---> Folder II ----> Element

elaaadani_1-1618960488526.png

 

I don't know how to handle this filter for this case.

I tried with the column 

 

Modified ge '2021-04-20' 

 

and with

 

Id gt 5000
Id gt 0

 



and I always get the result of an empty query.
Please your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions

My bad. Got confused since title of the action was not in English.

 

Can you try filtering using created column like below? Since you have more than 5000 items, you should define index on created column.

https://team.XXX.com/sites/dev/_api/web/lists/getbytitle('Customer%20Name')/Items?&$filter=Created ge '2021-04-21T12:00:00Z'

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

8 REPLIES 8
PrasadAthalye
Community Champion
Community Champion

Are you trying to get the item that you just created?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Yes ! @PrasadAthalye 

Ok then you can just use Get Item Action and provide ID from create Item Action.

 

PrasadAthalye_0-1618964647024.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

In that case, I would have to decompose the http request body, right?
In that case, how do I get the Item ID if it appears with value 0?

"HasException": false,
"ItemId": 0
}
]
}




Thanks for your help and your kindness

I see that you are using Create Item Action of SharePoint. This action exposes ID. You can use that one. Refer below...

 

PrasadAthalye_0-1618965772743.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

@PrasadAthalye 

No, I am not using that connector. I use HTTP request, because I have to create elements inside folders in Sharepoint. Create element itself does not allow me to do this.
That's why I don't have ID exposed.
When I view the Body in HTTP request, I get the ID set to 0.

elaaadani_0-1619011378676.png

 

My bad. Got confused since title of the action was not in English.

 

Can you try filtering using created column like below? Since you have more than 5000 items, you should define index on created column.

https://team.XXX.com/sites/dev/_api/web/lists/getbytitle('Customer%20Name')/Items?&$filter=Created ge '2021-04-21T12:00:00Z'

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

@elaaadani - Did you get chance to try above API option?

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,046)