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

Auto populate a column in a sharepoint list based on information from another column

Hi guys,

 

I've had a search around and havent found anything that suits my needs within the forum so apologies if it's there and I havent looked hard enough. 

 

I've got a flow set up that takes the responses from a form and then auto-populates a sharepoint list.

 

This works fine however I need an additional level of functionality.

 

I'm looking to auto-populate another column based on the response from one of the questions in the form.

 

In the form I have a multiple choice with the names of people within the business.

 

What I want to happen is when one of these names are selected and results added to the sharepoint list I want the persons manager to also be added as a column.

 

Right now I only have an excel sheet with people names and their manager next to it.

If it is easier I will create a separate sharepoint list. 

 

How can I make the column populate based on the data in another column?  

 

Many Thanks for any help or insight. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Auto populate a column in a sharepoint list based on information from another column

Hi @jaaykidd 

 

"Search for users" action returns a collection of matched user as you already see there is an "apply to each" action. 

I would suggest you to add a compose action before "Update Item" to see what you are getting in "items('Apply_to_each')?['Mail']". This will help to find the fix.

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

9 REPLIES 9
Super User
Super User

Re: Auto populate a column in a sharepoint list based on information from another column

hi @jaaykidd  you can do that using a caculated colum and then add it a condition.

 

Look de doc to the contidion:

https://support.office.com/en-us/article/if-function-7025be14-5665-43d0-af20-8293d1fe9d3a

 

and lokk this video https://www.youtube.com/watch?v=x_cYLkph3bY





Did I answer your question? Please consider to Mark
my post as a solution! to guide others 😉


Proud to be a Flownaut!





Super User
Super User

Re: Auto populate a column in a sharepoint list based on information from another column

Hi @jaaykidd 

 

If the people you are trying to add exists in your O365, then you can use already available action called -"Get manager (V2)", this will give you manger name for the given user.
If the people you are trying to add, does not exist in O365, then I would recommend creating an SP list with the user to manager mapping, and for each user filter the SP list to get manager name.

 

——————————————————
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up. 

Super User
Super User

Re: Auto populate a column in a sharepoint list based on information from another column

@jaaykidd 

If the individuals are all within your organization and the managers have been populated in Office 365, you can use the Office 365 Users Get Manager action to retrieve someone's manager.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
jaaykidd
Level: Powered On

Re: Auto populate a column in a sharepoint list based on information from another column

Hey, 

 

@DeepakS @ScottShearer 

 

Thank you for the responses. Will I need to create a sort of lookup function to make this work? 

Currently, I only have the names of the users stored as options in the form itself, not the emails. 

 

Will there be a function that will search for the users email address based on their full name before the get manager function runs or can the function run without this?  

 

Many Thanks again. 

Super User
Super User

Re: Auto populate a column in a sharepoint list based on information from another column

hi @jaaykidd 

 

you can use "Search for users" action to get user email by display name and use it in Get Manager Action.

Manemail.png

 

 

——————————————————
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up. 

jaaykidd
Level: Powered On

Re: Auto populate a column in a sharepoint list based on information from another column

@DeepakS 

 

Hey Deepak, thanks for the support.  I'm struggling to get this to work, however I am trying to use the exisiting field filled in via form as the search criteria.  

 

This is what I currently have. 

 

flow 1.PNGThis works fineflow 2.PNGThis runs with no issues but doesnt populate the email field in the sharepoint list

Super User
Super User

Re: Auto populate a column in a sharepoint list based on information from another column

Hi @jaaykidd 

 

What is the type of "Advisory Email" column, isn't person type? Also, is another column value is updating?

 

Regards,

jaaykidd
Level: Powered On

Re: Auto populate a column in a sharepoint list based on information from another column

Hi @DeepakS , 

 

If I'm understanding your questions correctly.  I believe the advisor email is just a plain text string in the list. 

 

Nothing else should edit the item. The first flow creates it but leaves it blank. The second flow edits it after the create trigger has been added.  

 

 

Super User
Super User

Re: Auto populate a column in a sharepoint list based on information from another column

Hi @jaaykidd 

 

"Search for users" action returns a collection of matched user as you already see there is an "apply to each" action. 

I would suggest you to add a compose action before "Update Item" to see what you are getting in "items('Apply_to_each')?['Mail']". This will help to find the fix.

 

-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

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 Kudoed Authors
Users online (3,454)