Crow Canyon Software Forum
List view query question
Quote from skigeek on February 3, 2025, 11:49 amI 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.
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.
Quote from supportTeam on February 6, 2025, 8:53 amHi 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.
- Open the NITRO List View settings.
- Go to the Advanced Settings tab, find 'Customize List View JavaScript Code,' remove the existing script, and paste the script from the attachment.
- 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.
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.
- Open the NITRO List View settings.
- Go to the Advanced Settings tab, find 'Customize List View JavaScript Code,' remove the existing script, and paste the script from the attachment.
- 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: