Beavon Ondari

Beavon Ondari

  • NA
  • 40
  • 55.4k

Filter all current users in SharePoint

Sep 25 2017 2:49 AM
Hello C# Corner!
 
My code below I am able to filter one logged in user, but what i want to filter all logged in users instead of one.
  1. var Filter = "?$filter=(UserName eq '"+LogedinUser+"') and (Status eq 'Open')";  
  2. getFilteredlist('Shared Folders', Filter ,function(spData)  
  3. {  
  4. fileArray = spData;  
  5. //Check Data  
  6. console.log(spData);  
  7. for (k = 0; k < spData.length; k++)  
  8. {  
  9. var Library = spData[k].Relative_x0020_Path;  
  10. var FileID = spData[k].FileID;  
  11. var ListID = spData[k].ID;  
  12. var Filter1 = "&$filter=ID eq '"+FileID+"'";  
  13. Getfilteredlibrarylist(Library, Filter1, ListID, function(resultsarray, LID)  
  14. {  
  15. dataArray[LID] = resultsarray;  
  16. t++;  
  17. });  
  18. }  
  19. });  
Please anybody with helpful explanation or code, will be much appreciated. Thanks

Answers (1)