Hi,
I want to be able to do a Call to Action whereby the User's name is taken from PVA/Office 365 and used to filter and Get Item from a SharePoint List. The two SharePoint Columns are
IE is Sally is using the PVA, the Flow would find Sally in Office 365, use the O365 Connector to find her email address, use the email address to lookup the correct person in the "Name" list column and get the corresponding information from the "Title" column.
It works find when I test it in an Instant flow, but when I try and put it in a PVA flow, it comes up with an error on the "Return value(s) to Power Virtual Agents" action:
"The output you selected is inside a collection and needs to be looped over to be accessed. This action cannot be inside a foreach."
Here is what I have created so far. Can anyone help?
In the field where you return the value to the Bot. First() would go around the Values dynamic content from the GetItems. That will give you the first item that was retrieved. Adding ?['Title'] would return just the Title field value from that first record.
Thanks @Pstork1 - where would I write First()?['Title'] ?
The problem is that the Get Items is going to return an array of records. It may be 0, 1, or more than one. But you need to process the array to turn it into some form of string to be able to return it to the Bot. If you are expecting just one match you can use First()?['Title'] to get the Title column of the first record returned. Otherwise you'll need to use the markdown language to format the table as a string.