Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

List view query question

I want to create a list view that is dynamic and will filter based on a property of the person logged in. I know I can use Me, to filter for my own, but what I am looking for is the ability to use a property of the person logged in. Example "Department". I am not doing this inside a form and I know that I can do it there, but I just want to use the view widgit.

Hi Art,

We have set up a script that dynamically retrieves the property of the currently logged-in user and compares it with the value in a column(see attachments). For example, if the logged-in user's department is 'Sales,' the script will compare it with the value in the column that contains the department.

We have shared an attachment with the script provided below, please follow the below steps.

  1. Open the NITRO List View settings.
  2. Go to the Advanced Settings tab, find 'Customize List View JavaScript Code,' remove the existing script, and paste the script from the attachment.
  3. Update the 'RequesterDepartment' value in the script to match the department column in the view, then save the list view(see attachment for more details)

Note: Make sure the department column is included in the SharePoint list view. It can be hidden using the 'Hide Columns' settings, but the script won't work if the column is missing from the SharePoint list view.

 

Uploaded files: