May 05 2017 01:56 AM
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 in the next step ? I see that the correct values are being retrieved when I see the flow execution log.
There seems no way to get the count of items though !!
May 08 2017 03:34 AM - edited May 08 2017 03:37 AM
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-i... (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
May 09 2017 01:15 AM
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