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

Power Automate add form section to teams

Hi

This has probably been asked a million times, but here we go again.

I have a form that starts with 3 radio buttons, choices. Each one of those links to a different section in the form with questions related to that choice, and then submitted. On submitting, I use Power Automate to gather that data and add it to a Teams Channel. The only issue I have now is that I load all the choices and related questions in the Teams Channel and the Section that was completed on the form will have the answers, all the other headings will just have blank spaces.

 

My question is, is there a way to only post the Section that has been completed? So if choice 2 is selected, only Section 2 is displayed in the Teams Channel. In essence, using inline 'if else' expressions, but I cannot find an 'else'.

 

I hope that makes sense. Thanks in advance for any help.

1 ACCEPTED SOLUTION

Accepted Solutions
Jondoesflow
Helper V
Helper V

Hi,

 

Maybe this will help.

 

I created a pretty standard form, comprising of 1 question with three choices which then routed to the question below:

 

Jondoesflow_0-1664366823907.png

Then in Power Automate I got the responses from the form, and did a Switch condition based on the answer from the radio button.

 

I then updated the Response varaible with the answer of the question that the person got routed to, and then passed that Response variable back to a Teams channel:

 

Jondoesflow_0-1664367366328.png

 

 

Does this help? If so can you like the comment and mark this as a solution?

 

Thanks.

View solution in original post

7 REPLIES 7
Jondoesflow
Helper V
Helper V

Hi,

 

Maybe this will help.

 

I created a pretty standard form, comprising of 1 question with three choices which then routed to the question below:

 

Jondoesflow_0-1664366823907.png

Then in Power Automate I got the responses from the form, and did a Switch condition based on the answer from the radio button.

 

I then updated the Response varaible with the answer of the question that the person got routed to, and then passed that Response variable back to a Teams channel:

 

Jondoesflow_0-1664367366328.png

 

 

Does this help? If so can you like the comment and mark this as a solution?

 

Thanks.

Hi

Thanks so much for that, looks as though it is exactly what I need.
Will let you know how it goes.

Cheers

@drewnadin Nice !

Hi

 

Just curious how you got the last bit of this expression [body/r....].

drewnadin_1-1664370884383.png

 

Hi,

 

I don't think mine was in an apply to each, I just had the switch condition and that is based on the question you want to collate the answers on, and then set the responses variable to whatever you need inside each of the cases of the switch 

Hiya
Shot for this. I have no idea why Power Automate kept chucking things in "Apply to Each" blocks, I eventually started from scratch and found everything I needed. It is all working swimmingly fine now. Thanks so much for your help.

@drewnadin Great news, if I have solved the issue for you, can you like my reply and mark it as a solution ?

 

Thanks.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,048)