none
How we get Random item from list using javascript object model(JSOM) RRS feed

  • Question

  • Hi to all ,

    I want to get random item from list using JSOM. I also want to get random item day by day using JSOM .How i will do ?


    • Edited by Navneet jini Wednesday, January 15, 2014 9:19 AM
    Wednesday, January 15, 2014 9:18 AM

Answers

  • use the RESTful search API and use the sortlist as below 

    http://server:port/_api/search/query?querytext='ListID:yourListID'&sortlist='[random:seed=5432]:ascending'&rowlimit=1


    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

    Saturday, January 18, 2014 10:49 PM