I have a site column of type "Text", and users have assign this column a default value at the list level. so now my site column contains null default value, while its child list columns are having a default value per list. now i want to apply a JSLINK to this column to hide it from quick edit grid. so I did the following steps inside our test server:-
then i run the following power-shell script to associate the site column with the related jslink:-
$web = Get-SPWeb http://vstg01 $field = $web.Fields["Customer Initials"] $field.JSLink = "~siteCollection/Style Library/JS/HideColumnsINGrid1.js" $field.update($true)
now the result is that the JSLINK will be applied to the site column and all its child list columns, which is fine.. but what happened is that the list columns' default value have been cleared out since the site column does not have any default value.. and seems that applying the JSLINK using powershell will override the specific list column settings..
so can i do these steps instead of the above:-
to associate the site column with the JSLINK , but without applying this change to any of its child list columns.
then to loop through all the lists and define the JSLINK at the list level for the column.
in this case any new lists will get the JSLINK associated with the column (since i have apply it to the site column) , also existing lists will have the JSLINK associated with the list column and their current default value and settings will not get overridden,
Can anyone advice on this please?