Forum Discussion
Vipul Kelkar
May 05, 2017Brass Contributor
Retrieved SharePoint list items count
I have a flow which retrieves list items from a SharePoint list by passing a odata filter query (for eg Status eq 'Draft'). Is there a way to identify the count of the retrieved items and then use it...
serge Luca
May 08, 2017MVP
yes. if the SharePoint action you are using is Get Items, let's say you name it "GetMyItems", you can store the following Logic App (WDL) code @length(body('GetMyItems')?['value']). You can read my blog post https://sergeluca.wordpress.com/2017/04/26/using-the-azure-logic-apps-workflow-definition-language-in-microsoft-flow-part-1/ (see the last part).
Store "@length(body('GetMyItems')?['value'])" in a Compose action and reuse the compose action output where you want (don't forget the double quotes around the whle expression)
Hope this helps.
Cheers
Serge Luca
Vipul Kelkar
May 09, 2017Brass Contributor
Yes I was using the Get items action. Thanks it worked :)
This has just given me a pointer to explore Logic app-WDL code more and how to use it in Flow !!
Cheers