cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KarthikLohan
Frequent Visitor

How to return a list value to PVA

HI,

 

I have a multiple rows of data for a single District Name which is also a column value. When user input the district name, how to search and get all the multiple rows of data for that district and display it in PVA Chat  Bot. If I use "List Rows Present In a Table", it does not allow the row values to get displayed in the Return action stating error as :  "The output you selected is inside a collection and needs to be looped over to be accessed. This action cannot be inside a foreach."

 

Total no of columns is 5.

 

what is the solution, please suggest.

Karthik

1 ACCEPTED SOLUTION

Accepted Solutions
Jcook
MVP

Hello @KarthikLohan 

 

Unfortunately, you cannot pass arrays back to PVA at this time.

 

As a work around you can do the following:

Add a String Variable, Inside the Loop use an Append to String Variable action (This is used to add all the data from the Loop into one variable).

Jcook_0-1618329554399.png

 

 Now outside the Loop you can pass in the String Variable back to PVA:

Jcook_1-1618329590764.png

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

2 REPLIES 2
Jcook
MVP

Hello @KarthikLohan 

 

Unfortunately, you cannot pass arrays back to PVA at this time.

 

As a work around you can do the following:

Add a String Variable, Inside the Loop use an Append to String Variable action (This is used to add all the data from the Loop into one variable).

Jcook_0-1618329554399.png

 

 Now outside the Loop you can pass in the String Variable back to PVA:

Jcook_1-1618329590764.png

 


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Pstork1
Dual Super User
Dual Super User

Another way to do this is to use the markdown features and Append to a string to create a formatted table to return to the Chat.  The table can then be displayed as a list.  Take a look at the following article.

How to make your Teams bots richer with markdown – Vesa Nopanen – My Teams & Microsoft 365 Day (myte...



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

Canadian Cloud 2022 768x460.png

Register for a free PVA chatbot creation workshop.

Learn how to respond rapidly to your customers and employees at scale, using intelligent conversational chatbots.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (5,600)