web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Lookup column value fr...
Power Automate
Unanswered

Lookup column value from sharepoint list based on Form response and assign it to a variable

(1) ShareShare
ReportReport
Posted on by 8

Hi,

I am building a Flow where the "Office Location" drop down menu in my Form will determine who the form response data will get emailed to. I also have a sharepoint list called "LocationsList" with two columns. Column A has office locations and Column B has employee email addresses. I want the selection in the Form for "Office Location" to lookup the location in Column A and then retrieve the associated Column B email address and then dump that into a variable. I have the variable and rest of the email flow working, and just need to figure out how to get the "Office Location" seection from the Form to lookup the Column B email in the sharepoint list.

 

I also can get this to work Control function statements but it takes a LOT of them to cover all of the 50+ office locations and the flow gets really big and messy. Hoping these is a simpler way to do this.

 

Anybody know how to do this?

 

Thanks,

Andy

Categories:
I have the same question (0)
  • Verified answer
    v-LilyW-msft Profile Picture
    on at

    Hi @andyvt 

    According to your description, you want to get the email in the Sharepoint list according to the result of the Office Location selection in the Form.

    If any misunderstanding, please kindly let me know.

    I have set up a simple flow you can refer to:

    This is my test list

    vLilyWmsft_0-1626155254568.png

    This is my test From

    vLilyWmsft_1-1626155254572.png

    Flow in details

    vLilyWmsft_2-1626155254574.png

    Get the item from list which ColumnA is equal to the Office Location from From.

    vLilyWmsft_3-1626155254577.png

    Get the value of ColumnB in this item

    vLilyWmsft_4-1626155254578.png

    When a new response is submitted as below:

    vLilyWmsft_5-1626155254580.png

    Will get the email corresponding to Location2

    vLilyWmsft_6-1626155254583.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.

  • andyvt Profile Picture
    8 on at

    Hello @v-LilyW-msft ,

     

    Thank you for the reply. I think you have understood correctly my intention for this flow.

    I have been testing this and not able to get this working.

    Here is my form:

    andyvt_0-1626737737650.png

     

    Here is the Sharepoint list:

    andyvt_1-1626737862040.png

     

    Here is the flow:

    andyvt_3-1626738018650.png

    andyvt_9-1626738395236.png

     

    andyvt_7-1626738282143.png

     

    andyvt_8-1626738310353.png

     

    I am not able to get the email to come through. Am I setting the variable correctly?

    Also, on the Compose step within the Apply To Each step, how do you get the "OUTPUT" field to appear and what does this do?

     

    Thanks.

  • v-LilyW-msft Profile Picture
    on at

    Hi @andyvt 

    I tried to reproduce your scenario with variable but it works fine for me.

    The role of Compose in my above solution is just to show the results.

    In fact, you don’t need to set variables. If you want to send an email, just add send an email action at the end as below.

    vLilyWmsft_0-1626757254182.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.

  • andyvt Profile Picture
    8 on at

    Hi all,

    Thanks for your replies. I rebuilt the entire flow and it worked after that. I must have had some error somewhere in my original attempt. The replies above are all good. Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard