Hi Thomas A Wolfe,
Based on your description, you want to hide columns depending on the user's permissions.
We couldnt do this by SharePoint because SharePoint has no built-in feature for this. The least level that we can apply permissions is item level. If you hide a column in a view, it will be applicable to all the users. You could only do it by third party solution.
Please refer to the case for more details
There are two solutions from CodePlex, please take a look at:
http://splistdisplaysetting.codeplex.com/
http://spcolumnpermission.codeplex.com/
Hope it will be helpful to you.
Best Regards,
Hi Thomas A Wolfe,
There are two ways to set permissions on a item depending on columns values.
- You could do it with a workflow, please refer to the link below:http://spcycle.blogspot.com/2012/01/how-to-create-workflow-to-change-item.html
- You could create views to filter the items depending on the columns values. Then try the solution I have given you above. It can grant permissions to views.
The solution: http://spcolumnpermission.codeplex.com/
Hope it will be helpful to you.
Best Regards,
Hi Thomas,
You can disable the column using below script,firstly you have to find the user group than disable the columns.
Step 1-Add a script editor Web Part on page
Step 2-add below js file in Site collection Style library
1-jquery-2.1.4.min.js
2-jquery.SPServices-0.6.2.min.js
then add the below code(use your form id and group) in script editor Web part(change your own path in both js File )
<script type="text/javascript"
src="/Style%20Library/JS/jquery-2.1.4.min.js">
</script>
<script
type="text/javascript" src="/Style%20Library/JS/jquery.SPServices-0.6.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
debugger;
$().SPServices({
operation: "GetGroupCollectionFromUser",
userLoginName: $().SPServices.SPGetCurrentUser(),
async: false,
completefunc: function (xData, Status) {
$(xData.responseXML).find("Group").each(function () {
//alert($(this).attr('Name'));
var responseDueDate= document.getElementById('ctl00_ctl32_g_65d37a62_a18e_4ad2_809b_39426ec1522e_ff61_ctl00_ctl00_DateTimeField_DateTimeFieldDate');
var status= document.getElementById('ctl00_ctl32_g_65d37a62_a18e_4ad2_809b_39426ec1522e_ff41_ctl00_DropDownChoice');
var concernDepartment= document.getElementById('ctl00_ctl32_g_65d37a62_a18e_4ad2_809b_39426ec1522e_ff51_ctl00_Lookup');
var requestDescription= document.getElementById('ctl00_ctl32_g_65d37a62_a18e_4ad2_809b_39426ec1522e_ff31_ctl00_ctl00_TextField');
var responseDescription= document.getElementById('ctl00_ctl32_g_65d37a62_a18e_4ad2_809b_39426ec1522e_ff71_ctl00_ctl00_TextField');
if ($(this).attr('Name')=='UserGroup')
{
responseDueDate.disabled=true;
status.disabled=true;
concernDepartment.disabled=true;
responseDescription.disabled=true;
}
else
{
responseDueDate.disabled=true;
requestDescription.disabled=true;
}
});
}
});
});
</script>