Forum Discussion

Shubham305's avatar
Shubham305
Copper Contributor
Mar 06, 2023

Resetting Row limit for Sharepoint online list using sharepy

Using rest RenderListDataAsStream when i am passing xml query to reset rowlimit, in response still i am getting 30 rows. how can i get all the list items

ViewXml": "<View><RowLimit>100</RowLimit></View> 
  • Sudharsan K's avatar
    Sudharsan K
    Steel Contributor

    Hi Shubham305 

     

    I am not certain of where and how you are using the RenderListDataAsStream method. Below is the code that I tried to use in SPFx using typescript and I tested and its working fine with the row limit.

     

    public _demo = async () => {
    	try {
    		const renderListDataParams: IRenderListDataParameters = {
    			ViewXml: "<View><RowLimit>3</RowLimit></View>",
    		};
    		const items = await this._sp.web.lists.getByTitle('Designations').renderListDataAsStream(renderListDataParams);
    		console.log(items.Row);
    	} catch (err) {
    		console.log(err);
    	}
    }

     

    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.

    For SharePoint blogs, visit: SPKnowledge.com

     

  • Shubham305 Can you share full code you are using to fetch list items? I will be easier to answer your question more precisely by looking at the code.


    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.

    For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

Resources