cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
msuser33
Regular Visitor

Problem Power Virtual Agents with SQL return Values Back to PVA

I run a simple Flow in PVA, the Flow run a stored Procedure and i want to return the result back to PVA but if i select the Result Value i get the following Error 

SQL.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
renatoromao
Super User
Super User

Hi @msuser33 ,

 

Yes, you got an error because you are trying to insert a list value in an output string, Power Automate recognizes that is incompatible.

 

If you want to get the last value (because when you execute a procedure, return one or more than one item), follow these steps:

- Create an action called "Initialize variable" with type string on the beginning of the workflow

- Create an action called "Set variable", after the SQL action, select your created variable and the value will be the Dynamic content called "ResultSets...".

- Inside the final PVA action, use the variable created instead of "ResultSets"


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

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.650 students) : English | Português

View solution in original post

1 REPLY 1
renatoromao
Super User
Super User

Hi @msuser33 ,

 

Yes, you got an error because you are trying to insert a list value in an output string, Power Automate recognizes that is incompatible.

 

If you want to get the last value (because when you execute a procedure, return one or more than one item), follow these steps:

- Create an action called "Initialize variable" with type string on the beginning of the workflow

- Create an action called "Set variable", after the SQL action, select your created variable and the value will be the Dynamic content called "ResultSets...".

- Inside the final PVA action, use the variable created instead of "ResultSets"


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

Renato Romão,

Connect with me here 😉

Power Virtual Agents course (+2.650 students) : English | Português

View solution in original post

Helpful resources

Announcements
V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

PVA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (863)