cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cgiliberto
New Member

Create an email flow that filters out unanswered responses

I have set up an form flow that sends an email when a form has been submitted. This flow shows answers to all fields in the form, however I only want to see fields that have been completed. How can I create a flow that filters out any unanswered fields in the form?  

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @cgiliberto 

Do you want to send an email only contains the answered responses?

You can take a try with the following screenshots.

This is my test Form.

vLilyWmsft_7-1631166490484.png

Flow in details:

vLilyWmsft_2-1631166183217.png

Expression1:

if(equals(outputs('Get_response_details')?['body/ra8c7bc18d28b4d069116548b45a6454e'],''),null,concat('Question1: ',outputs('Get_response_details')?['body/ra8c7bc18d28b4d069116548b45a6454e'],'<br>'))

Expression2:

if(equals(outputs('Get_response_details')?['body/r7c31be52dcc74bbb8d24591d7045fccd'],''),null,concat('Question2: ',outputs('Get_response_details')?['body/r7c31be52dcc74bbb8d24591d7045fccd'],'<br>'))

Expression3:

if(equals(outputs('Get_response_details')?['body/rc46a442e84ad4e4e80833653bfe07da5'],''),null,concat('Question3: ',outputs('Get_response_details')?['body/rc46a442e84ad4e4e80833653bfe07da5'],'<br>'))

vLilyWmsft_5-1631166417199.png

Note:select 'Question1' the formula show outputs('Get_response_details')?['body/ra8c7bc18d28b4d069116548b45a6454e']

vLilyWmsft_11-1631166725289.png

vLilyWmsft_9-1631166562871.png

When I submitted a Form:

vLilyWmsft_12-1631166833000.png

I will receive an email like this:

vLilyWmsft_13-1631166876462.png

Hope the content above may help you.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

14 REPLIES 14
Achavan
Resolver II
Resolver II

Hi @cgiliberto ,

 

You can filter fields that are filled.

example-

I have test form with 2 questions, How are you and where do you live

I have added a condition to check if how are you is equal to null (does not contains data) if yes then skip if no then store the field in variable and then use it.

Achavan_0-1630992240063.png

Hope this helps!

Thanks for your help! 

Could you please advise how I can set up the next steps? 

If no, how do I set up a 'skip' trigger/condition? 

If yes, how can I set up a flow that includes it in the email notification? 

 

I'd like to set this up for every question in the form, so will I need to set up an individual condition for each question or is there quicker way I can add this to every question? 

 

Thank you 🙂

Hi @cgiliberto 

Do you want to send an email only contains the answered responses?

You can take a try with the following screenshots.

This is my test Form.

vLilyWmsft_7-1631166490484.png

Flow in details:

vLilyWmsft_2-1631166183217.png

Expression1:

if(equals(outputs('Get_response_details')?['body/ra8c7bc18d28b4d069116548b45a6454e'],''),null,concat('Question1: ',outputs('Get_response_details')?['body/ra8c7bc18d28b4d069116548b45a6454e'],'<br>'))

Expression2:

if(equals(outputs('Get_response_details')?['body/r7c31be52dcc74bbb8d24591d7045fccd'],''),null,concat('Question2: ',outputs('Get_response_details')?['body/r7c31be52dcc74bbb8d24591d7045fccd'],'<br>'))

Expression3:

if(equals(outputs('Get_response_details')?['body/rc46a442e84ad4e4e80833653bfe07da5'],''),null,concat('Question3: ',outputs('Get_response_details')?['body/rc46a442e84ad4e4e80833653bfe07da5'],'<br>'))

vLilyWmsft_5-1631166417199.png

Note:select 'Question1' the formula show outputs('Get_response_details')?['body/ra8c7bc18d28b4d069116548b45a6454e']

vLilyWmsft_11-1631166725289.png

vLilyWmsft_9-1631166562871.png

When I submitted a Form:

vLilyWmsft_12-1631166833000.png

I will receive an email like this:

vLilyWmsft_13-1631166876462.png

Hope the content above may help you.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you, unfortunately I am not having any success. As far as I can see I've set up my expressions the same as you have but an error keeps occuring. I have no idea what is going on... 😞 

cgiliberto_0-1631242640191.png

 

Hi @cgiliberto 

Could you provide your Form screenshot and a formula of yours for me?

Best Regards

cgiliberto
New Member

Thank you - Here are my expressions: 

Expression 1:
if(equals(outputs('Get_response_details')?['body/r660a16d4fccf45f0a27b4a9c08b7d8c2']),null,concat('Name:',outputs('Get_response_details')?['body/r660a16d4fccf45f0a27b4a9c08b7d8c2'],'<br>'))
 
Expression 2: 
if(equals(outputs('Get_response_details')?['body/r7678f150fa8b49eb82b9e81bc4b67b34'],null,concat('Gender:',outputs('Get_response_details')?['body/r7678f150fa8b49eb82b9e81bc4b67b34'],'<br>')))
 
and email set up:
cgiliberto_0-1631243156419.png

 

Thanks,
Casey 
 

Hi @cgiliberto 

This is missing from your formula, please add it and try again.

vLilyWmsft_0-1631243364191.png

Expression1:

if(equals(outputs('Get_response_details')?['body/r660a16d4fccf45f0a27b4a9c08b7d8c2'],''),null,concat('Name:',outputs('Get_response_details')?['body/r660a16d4fccf45f0a27b4a9c08b7d8c2'],'<br>'))

Expression2:

if(equals(outputs('Get_response_details')?['body/r7678f150fa8b49eb82b9e81bc4b67b34'],''),null,concat('Gender:',outputs('Get_response_details')?['body/r7678f150fa8b49eb82b9e81bc4b67b34'],'<br>'))

 

Best Regards.

cgiliberto
New Member

No luck again. I even copied and pasted your codes and still failed: 

cgiliberto_0-1631245794444.png

Is there any way you could please help me offline on a call or know anyone who can amend this for me? 

 

Thank you,

Casey 

Hi @cgiliberto 

Did you copy these two formulas?

Expression1:

if(equals(outputs('Get_response_details')?['body/r660a16d4fccf45f0a27b4a9c08b7d8c2'],''),null,concat('Name:',outputs('Get_response_details')?['body/r660a16d4fccf45f0a27b4a9c08b7d8c2'],'<br>'))

Expression2:

if(equals(outputs('Get_response_details')?['body/r7678f150fa8b49eb82b9e81bc4b67b34'],''),null,concat('Gender:',outputs('Get_response_details')?['body/r7678f150fa8b49eb82b9e81bc4b67b34'],'<br>'))

 

I test on my side and have no problem, please delete the original formula and copy the above formula try again.

Best regards.

cgiliberto
New Member

When I copy and past your expressions they work, but the other ones I create are not working.... I cannot figure out where I am going wrong. I am copying exactly! 

cgiliberto
New Member

I have figured it out. Thank you so much for your help 🙂 

 

Glad your problem is solved!

You are welcome 😊

cgiliberto
New Member

Hello, 

 

Is there a way you can format the 'output' so that the questions are bold or a different colour and stand out from the answers? eg. this is what the current form responses look like, there are no spaces between the question and answer and same typeface:

 

You have a new request!

Name:
-- Date Rquested:2021-09-14
Request Type:Client Gifting
Client Gifting Description:Test
Quantity:3
Shipping Address:Test
Contact Number:Test
Email Address:Test

Hi @cgiliberto ,

I tried below and it worked for me for Emails

Achavan_0-1632116172465.png

Achavan_1-1632116189833.png

 

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 (2,092)