first post here. I'm a frequent visitor to the site but haven't posted until now. Now I'm facing an issue that has almost beaten me and I need your help.
My scenario (using SharePoint Designer and SharePoint Online):
I have a list that I need to retrieve item info from using a SharePoint 2013 workflow and calling the SharePoint REST api to then create an email summary if you like of the last 5 items created.
My issue is that when I set an index variable to 0 and then make sure the loop includes a calculation of index plus 1 to increment, it counts up just fine and logs to the history list as expected but what I need is for it to start from the highest item result number (using a count of items variable) and inserting a calculation of count minus 1 which I then output to a calculation result variable and set that to my item result number in my get action to then count down the last 5 items created. I set this up and no results log to the history list. I'm calling from _api/web/lists/getbytitle('listname')/items.
Also there aren't many clear articles on sending the summary email. When I insert a result variable in to a send email action it only returns the last item in the loop but returns all items to the history list using the index plus 1 method.
Apologies if this is really long winded but trying to as specific as possible.
I'd appreciate any help I can get and will post screenshots if needed.