Sharepoint list view - set permissions so only certain users can access certain views - sharepoint

so I have a sharepoint list that contains all the data (We will call it MasterList), and it has an a dropdown column where different departments can be selected (example Sales, HR, Accounting etc etc). I created a view, which only shows data where HR is selected in this dropdown. Now is it possible to set permissions where a user can only see the HR view, and not the Master list. Basically I only want people from HR to see the HR view, and people from Accounting to only see the Accounting view, and then Admin can see all the views including the master list. Is this possible? Is there a better way to go about this? thanks!

I don't think there is a way to restrict PowerApps users to a certain Sharepoint List View. Depending on your org's size, you could investigate the Office 365 Users connector in PowerApps. This would allow you to filter the Sharepoint by Department or Job Title.
Example: Assumes the Sharepoint list has a column named dept
OnStart of the app:
// Set a variable for the user's department
Set(varUserDept, Office365Users.UserProfileV2(User().Email).department);
// Create a collection from the sharepoint list, filtered by department
ClearCollect(colData,
Filter(SHAREPOINT_LIST,
dept = varUserDept
)
)
That being said, if the URL of the Sharepoint list "leaks" users will be able to access the data. See this forum post for strategies for addressing this issue.

Related

Show specific data from excel to specific user in sharepoint

I have an excel sheet where there are two columns:
Email
loyalty points
example:
Email
Loyalty Points
abc1#company.com
248
abc2#company.com
540
My requirement:
When a user (abc1#company.com) login to his SharePoint he should see the token value as 248 and when the user (abc2#company.com) login to SharePoint then he should see the token value as 540.
Till now I have created a page on sharepoint and now I am wondering how to load data specific to user and display it in the sharepoint page.
Solution might be to Import That excel to a SharePoint list. Now based on situations:
A) Unique Item Permission
You can set unique permission per item in the SP library, then set it only for managers group and specific user.
Set unique item permission part can be automatized with WF or Power Automate Flow as well, after that it can be done for large amount of items (limit for unique item permission in SP list is 50 000)
B) View with filter
If the Loyalty Points are not secret and you just dont want to spam users with a lot of rows....you can create a list view in SharePoint list...Where you limit the values with Filter. (Library settings > Views > Create View) in Filter part you select person/group Column "Email" and in value you can put [Me]
[Me] and [today] are only available dynamic filters in View settings
You can display this view on HomePage for example and it will show always values only for specific user.

Sharepoint 2010 - list item permission according to value in column

I have a sharepoint list "Notes" with columns [Title] and [Department].
I fetch values for column [Department] from another list called "Departments" (columns [Id] and [Name].
I want this:
Everytime I add new record in "Notes", I want to set permission for this record according to permission set on the value in column Department.
So, basicaly, I SOMEHOW need to first set permissions, which users or groups has rigths for each department in list "Departments". After that, I need to inherit this permission in "Notes" list from the value of [Department].
For example:
Departments list would look like this
Billing (some permission for users or groups)
Operations (some permission for users or groups)
Sales (some permission for users or groups)
I want to add new record in "Notes" like "Hello, new item" and I chose department "Billing".
Now, I want that only users/groups which has rigths to see Billing records can see this record. No one else.
And so on... as soon as I add new record with [Department] Operations, I want only users/groups which have rigths to see Operations record to see only these records.
Is there any solution for me? I think it should has something to do with sharepoint designer workflow "Replace permission" but I never figured it out how to set as described above.
Thanks,
Jan
As you mentioned, the "Replace List Item Permissions" Action is the only way to achieve this without creating a custom event receiver. Here is a blog post about it: http://spcycle.blogspot.com.tr/2012/01/how-to-create-workflow-to-change-item.html.
Having said that, I don't think securing sensitive information at item level in a shared list by using workflows is a good idea. What if the workflow stops working someday for some reason? Not a rare case when you upgrade your SP deployment to the next version... People would keep using that list by relying on the assumption that their information is secured and I can imagine that that can create a lot of trouble for some. Besides if the number of items in that list is going to be "high" you will have performance issues and potentially hit the soft limits of SharePoint.
I would create a separate list for each department to store their notes or create a folder in the Note List for each department, lock it down to the corresponding department and ask that department's users to put their notes into their department's folder.

Infopath - Create a drop-down List from Active Directory "Department" field

Is it possible to create a Drop-down list in InfoPath which connects to Active Directory and fills the list with UNIQUE Department Values only (no repeating ones)
I need this for an InfoPath so when a user entering the data can pick one of the departments listed in the drop-down. Any help would be appreciated.
I've had a look at the people picker control, which works great for User names, but the department field is a separate field and has nothing to do with the user I pick, so I simply need a control which is populated by the unique Department codes in AD.
Any help would be appreciated.
You should really contact your administrator for this sort of information. You do not want a form to query every AD user to pull their department and get the unique values just to populate a drop down list. It is very possible to obtain the list of unique directories, however you should work with your administrator to populate this data to an XML web page or other similar solution and then connect your form to THAT data source through the form. The point is you are missing a step of obtaining the queried data.
With that said you can obtain the department of the user by querying the get user profile service to obtain the department name, elinating the need to even create a populated drop down list. See this article.

How can I narrow down my SharePoint 2007 View's filter results based on the Group By property?

I have a list within SharePoint 2007 and I've created a View that filters based on time ([Today]-30). I also have the View set to Group By a People or Group column. The end result is a View that displays all entries in the past 30 days grouped by individual.
So, what I'd like to do is only include those individuals that have 2 or more entries to display within the view. Is there a way to do this?
Thanks,
Brian
Views built through the UI are based on CAML queries, which only allow filters to be applied to items. As you can see from the schema, filters cannot be applied to group bys.
http://msdn.microsoft.com/en-us/library/ms415157.aspx
Your options are:
Filter it with some combination of sharepoint designer and jquery. This filtering would be done after the results are retrieved from the database, so it wont be ideal.
Write a custom web part.

InfoPath - MOSS User Information List as Data Connection - Exclude groups

I have an InfoPath form where I want to place a drop down list to select a user from a MOSS server.
I added a Data Connection in InfoPath to the User Information List list in my MOSS server. It works well, but the values I get are:
DOMAIN\administrator
SharePoint Owners
SharePoint Visitors
SharePoint Members
NT AUTHORITY\local service
System Account
Is there a way in InfoPath (or MOSS) to filter the list so it doesn't include groups?
Bonus question: Is there a way to filter it so system accounts are not shown?
Yes you can. When you set up the drop down to fill with data from the data connection you can filter the entries for the information that you want. After you have selected the datasource press the button to the right of Entries to select the repeating group that you want.
There is a filter data button on the Select field or group dialog.
From there you can filter the data how you want.

Resources