Forum Discussion
Information on the renderlistdataasstream API
Hey,
I have been looking through the docs for "working with lists and list items with rest" ( Working with lists and list items with REST | Microsoft Learn ) and have seen that there are some URI parameters that I should be able to use but cannot work out how.
I am looking to use "FilterLookupId" but info on how any of them work would be useful to know if anyone has the info.
The basic ones that SharePoint uses in lists I can work out by reading the URL but the others I am not having any luck with
I think you have to pass the item ID of parent/source list from where you have added the lookup column in the current list where you are using the API call.
Check if you can find any relevant information at:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- JoseffCopper ContributorSo my API call looks a little like this:
_api/web/GetListUsingPath(DecodedUrl=@a1)/RenderListDataAsStream?FilterField1=Affected%5Fx0020%5FUser&FilterValue1=joseffe1&FilterType1=Lookup
This works as expected but is causing issues and is only loading so many items and not loading everything. I have 70000 items in the list and I have indexed the lookup column but it is still causing issues with filtering.
I can modify the caml query in the body directly to look like:
<Eq><FieldRef Name='Affected User' LookupId='TRUE' /><Value Type=\"Lookup\">1</Value></Eq>
This then allows me to filter by ID and everything loads correctly but I would like to be able to do this through URL params if possible.
I have tried a few variations of the params:
FilterField1=Affected%5Fx0020%5FUser&FilterLookupId1=1&FilterType1=Lookup
FilterField1=Affected%5Fx0020%5FUser&FilterValue1=1&FilterType1=FilterLookupId
FilterField1=Affected%5Fx0020%5FUser&FilterValue1=1&FilterType1=Lookup&FilterLookupId1=true
But none of these seem to have any affect - the docs that you have mentioned and the ones I linked both dont seem to explain how the param would be used.
Any info on how these work would be super helpful.