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

Vlookup the responses from a form and add a row to excel

I am using a Form to collect responses. Now I am able to add it to excel online using trigger as : whenever response is submitted -> apply to each -> add a row . 
The problem is I want to use a mapping file to map the responses of various questions to another value. For example if I get a response as Yes. I want to enter the value as Stargazer. Unfortunately i cannot change the form.
How can I map the responses to different questions using 1 (or more) tables in excel (or a mapping list on sharepoint), before I add a row in my excel.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @sushant_mishra :

Do you want to find the corresponding value of each answer in the mapping file, and then use these values to add new rows?

My method is to traverse the mapping file, compare each answer in the process, and then save the matching results in different variables (each question corresponds to a variable). Then use these variables to add row.I've made a test for your reference:

1\My form

1.JPG

2\My flow

I created the variable "mappingfile" as the mapping file

2.JPG

 

3.JPG

 

4.JPG

Reference expression:

  1. items('Apply_to_each')['Question']
  2. items('Apply_to_each')['Value']
  3. items('Apply_to_each')['Question']
  4. items('Apply_to_each')['Value']

The Result: 

5.JPG

 Best Regards,

Bof

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @sushant_mishra :

Do you want to find the corresponding value of each answer in the mapping file, and then use these values to add new rows?

My method is to traverse the mapping file, compare each answer in the process, and then save the matching results in different variables (each question corresponds to a variable). Then use these variables to add row.I've made a test for your reference:

1\My form

1.JPG

2\My flow

I created the variable "mappingfile" as the mapping file

2.JPG

 

3.JPG

 

4.JPG

Reference expression:

  1. items('Apply_to_each')['Question']
  2. items('Apply_to_each')['Value']
  3. items('Apply_to_each')['Question']
  4. items('Apply_to_each')['Value']

The Result: 

5.JPG

 Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (26,612)