cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Danash
Helper I
Helper I

Passing a Parameter and Flow Error

Hello, 

 

I've been working on a flow for MS forms responses and when I got the hang of it, I found that we need to use Customer Voice instead since I can't pass the request ID from our help desk system to the MS forms via the Link :'(

 

Anyway, now I have two issues: 

 

1. I pass the request Id from the helpdesk system to Dynamics 365 customer voice Survey but not as a field, as a variable which I put in the question or description using {{RequestID}}. How can I pass this variable to the email flow subject? 

 

2. The basic flow was working and I received a basic email but now I get the below error message:

ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/activitypointer_activity_parties']' is of type 'Null'. The result must be a valid array.

 

anyone else had similar issues? 

Many thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Mira_Ghaly
Dual Super User II
Dual Super User II

@Danash 

You need to use a ParseJson step and pass the context Data , from your flow history get the output of the compose step and copy the value

Mira_Ghaly_0-1619088077286.png

 

and then add a ParseJSOn step and then click Generate from Sample and pass the output from the compose step

Mira_Ghaly_1-1619088146864.png

Then from the output of the ParseJSON you can get the different variables

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

12 REPLIES 12
Mira_Ghaly
Dual Super User II
Dual Super User II

@Danash 

Can you please share some screens from your flow that we can understand the issue happening?

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Danash
Helper I
Helper I

Hi @Mira_Ghaly 

 

sure, see below...

 

image.png

Mira_Ghaly
Dual Super User II
Dual Super User II

@Danash 

Can you try removing the Send email step outside your apply to each loop? like below:

Mira_Ghaly_0-1619083751715.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Hi @Mira_Ghaly ,

 

Thanks, that did solve problem number 2! 🙂 

 

do you have any idea how to get point 1 working? I pass the request Id from the helpdesk system to Dynamics 365 customer voice Survey but not as a field, as a variable which I put in the question or description using {{RequestID}}. How can I pass this variable to the email flow subject? "

Mira_Ghaly
Dual Super User II
Dual Super User II

@Danash 

Can you please show me how/where? you are passing this variable? 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Hi @Mira_Ghaly , 

 

Of course, so I pass a variable from our help desk system in the following format (I send the link from our help desk system): 

https://ecv.microsoft.com/knb3St94f5&ctx={"RequestID":"$RequestID"}

I then in customer Voice, use the passed variable $RequestID as a text in the question/introduction: 

image.png

Customer Voice would auto-populate some information about the survey 

image.png

 

The request Id which I passed for customer voice, is what I need to have in the email subject being sent from Power Automate. 

Mira_Ghaly
Dual Super User II
Dual Super User II

@Danash 

Can you please add a compose data operation and pass the Context Data From the Survey Response?

Mira_Ghaly_0-1619086194817.png

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly 

Thanks. one last relevant query, which dynamic attribute would give me the content? 

 

Screenshot 2021-04-22 112027.png

Mira_Ghaly
Dual Super User II
Dual Super User II

@Danash 

Sorry I do not get your request but were you able to retrieve the variable from the survey using the Context Data?

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

@Mira_Ghaly image.png

 

Yes, I was able to retrieve the context, I was asking on how to select one of the variables being passed as at the moment it is sending all of them

Mira_Ghaly
Dual Super User II
Dual Super User II

@Danash 

You need to use a ParseJson step and pass the context Data , from your flow history get the output of the compose step and copy the value

Mira_Ghaly_0-1619088077286.png

 

and then add a ParseJSOn step and then click Generate from Sample and pass the output from the compose step

Mira_Ghaly_1-1619088146864.png

Then from the output of the ParseJSON you can get the different variables

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

Worked Perfectly! thank you so much @Mira_Ghaly 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,873)