How can we add a column in Sharepoint list that gets user's information, for example Department

Hi, in any Sharepoint list, we can get who created the item from the 'Created By' column.

We also want to add a column to show the user's information, for example in every user's office 365 user profile, they have 'Department' or 'Office' updated.

How can we add a column in the Sharepoint list that automatically displays the user's 'Department' or 'Office'?

This is so that we can filter the list for analysis.

Thanks.

Hi GTMSW ADM

Thanks for using Microsoft product and posting in the community.

According to your description, you want to create a column which will auto display the user’s Department. We would like to suggest you use Flow feature to meet your requirement.

Here are the steps:
1. Create “department” column in the list: go to list> click setting in the upper right corner> List settings> click “Add from existing site columns” and choose “Department”, click Add, click OK

2. Create Flow: go to list> click Flow> click “See your flows”, it will open Power Automate in a new page> click Create(if you haven’t use this before, you need to sign in your account to associate SharePoint and Power Automate)> Automated flow> choose “When an item is created” and choose the site and list, click New step> choose the site, list and choose “Created by Department”(you could choose the items as the screenshot)>Save

3. When users add the list, the department will auto display after refresh the page (no need to type department value when creating items)

Note: if the user doesn’t have the department value in their profiles, the Department column in SharePoint list won’t display anything after this user add new items.

If my suggestion conflicts your requirement, please feel free and come back to describe more details. We are willing to help you.

Regards,
George

• Beware of Scammers posting fake Support Numbers here.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi, this works, the value is updated in the Sharepoint list after refresh. Is there a way to hide this field or grey out the field on the form?

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi GRMSW,

You can use Power App to customize the list form, in PowerApps you can change the column setting to "view only".

***********************************
If you feel a reply works for you, please kindly vote or mark it as an answer, it will be beneficial to other community members.
***********************************

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi GTMSW ADM
 
Thanks for posting back.
 
According to your description, you want the department option of the item will be grey out or unable to edit when users creating it
 
As Jimmy said, you could use Power App to meet your requirement.
 
Here are the steps.
1. Go to the list> PowerApps>Customize forms
2. It will auto open Power Apps> choose the department data card >turn off the Visible option
3. The department option will be invisible

If you have any concerns, please feel free and come back to share with us.

Regards,
George

• Beware of Scammers posting fake Support Numbers here.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi GTMSW ADM,

 

Have you seen my reply about using Power App? Does the suggestion meet your requirement? If you have any concerns, please feel free and come back to share with us.

 

Regards,

George

• Beware of Scammers posting fake Support Numbers here.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi George, it hides the field but doing this also affects other fields. For example, a date field which has previously defaulted today's date now defaults no date. Choice fields which were previously radio buttons now become dropdown lists. Fields with long descriptions were previously showing ok (the description continues on the next line), now the description gets cut off with '...'.

How do I revert back to the default Sharepoint form without PowerApps changes?

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi George, please help. I read that to remove the PowerApps form, I need to go to List Settings > Form Settings. But why can't I see Form Settings in this List Settings? The form does not work, when I click 'Save' nothing happens.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi OneAstrid,

 

According to your description, here are the suggestions may help you.

1. Since you can’t find the Form Setting button, it doesn’t mean you cannot access this feature.

You could copy the URL and edit it as your site and try to access it.

URL: https://CONTOSO.sharepoint.com/sites/listname/_layouts/15/FormSettings.aspx?List={72ad6cd2-58ca-49ab-b19c-a3d79278ddf6}

You need to change the bold part. For the latest part of the list ID, you could find it when you access the list and click the List settings.

For you List settings URL:

https://CONTOSO.sharepoint.com/sites/listname/_layouts/15/listedit.aspx?List=%7B72ad6cd2-58ca-49ab-b19c-a3d79278ddf6%7D

The bold part is the list ID, you could compare the differences between the two URL.

 

2. Base on my research and test, the Form setting is one of the default settings in the list setting. You could go to other sites and check whether this feature is available or not. If it is available in other lists, the issue is caused by a specific list. You could create a new list via suggestion 3.

 

3. If you cannot access the feature, you could create a new list from the existing list.

  Click settings> site contents>click New, list>From an existing list and choose

 

In the meanwhile, to reconfirm your requirement, if you want the department column is available in the list while it is invisible in the view, you could use this feature: Show or hide columns in a list or library

 

Appreciate your understanding and patient.

 

Regards,

George

• Beware of Scammers posting fake Support Numbers here.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi OneAstrid,

Please feel free to post back if you have any further concerns.


Regards,
George
• Beware of Scammers posting fake Support Numbers here.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated February 15, 2024 Views 10,613 Applies to: