cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jay312
Level: Powered On

Autopopulating a field or using lookups to another list

Hi,

 

I have 2 lists.

 

  • List 1: A bunch of emails of REGULAR people and what city they are from.
    • E.g Email: John@sfsfss.com  City: United Kingdom
  • List 2: A bunch of emails of TRAINERS and what city they are from. 
    • E.g. Support Email: dsdsad@yhadd.com City: United Kingdom

 

What I want to do is when an email arrives in a mail box, create a new sharepoint item in a list with the contents of the email.

My list contains:

  1. Email address of sender
  2. Subject of email
  3. Body of email
  4. City
  5. Trainer assigned

I need help getting 4 and 5 please. 

  1. What I want to do is Look up the persons name/ email address on List 1, if they exist on List 1 then populate the City field with their city on the sharepoint list using MS Flow

 

Please do you have any thoughts on how to do this look up/ auto-populate step? Below is a step by step run through

 

  1. John emails Help@sdsdd.com saying he has an issue
  2. Flow autopopulates basic fields in a sharepoint list, e.g. the subject + body
  3. Flow would then search list 1, which contains a list of all users names and their city. If the person exists on that list then flow will take the persons city and populate the city field in the sharepoint item.

I can provide more info if needed. All my flow now is get an email and create an item on a SPO list.. 

I also saw this thread. https://powerusers.microsoft.com/t5/Building-Flows/lookup-values-from-2-lists/td-p/235739 

 

 

2 REPLIES 2
Community Support Team
Community Support Team

Re: Autopopulating a field or using lookups to another list

 

Hi @jay312 ,

 

You could use a combination of Get items-Filter Query to get the specified item and get the field value contained in the item.

Please refer to the following blog and see if it helps:

https://veenstra.me.uk/2018/11/12/microsoft-flow-filter-queries-in-sharepoint-get-items/

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jay312
Level: Powered On

Re: Autopopulating a field or using lookups to another list

Hi @v-bacao-msft 

 

Thank you for reply as always!

 

Quick question/ please if you have any pics/ advice it would be great.

 

So my flow looks like this at the moment..  See pic 

1) When a new email arrives in a mail box

2) Create an item on a SP List and fill in values from email e.g. subject body

3) As you can see City is blank.. 

4) Now what I wanted to do is do a look up of the persons email or name on a separate list that contains name + City.

5) If the persons name/email is on that list, then look up the value they will have for City and fill it in on List 1.

 

Does this make sense / sound easily done please?  or is there something better to optimise it. At the moment I just have 2 lists, one for the new emails but with City field blank and second list with a bunch of names + city names - >Need to look up the persons name, and fill in the city field in list 1 by using the city field in list 2 - if the person is on that list..

image.png

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons in April

Read the announcement for more information!

firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,114)