Posted: Monday, October 20, 2008 by Ric in Labels: , , , , ,
0


with a custom built field, one can extend the SharePoint List functionality to allow for hiding and showing a field based on a choice from a dropdown:











The idea is that, in this list, we have c_hide and Special columns attributed to special types I developed in C#.


c_hide is a column that we can hide, the column itself does not have meaningful data for an end user.

but when the SharePoint List Designer builds the SharePoint List, he or she would place the following XML on c_hide's description:


<options>
<add name="IT" >
<add field="ITField" visible="true" />
<add field="CCField" visible="true" />
</add>
<add name="Call Center" >
<add field="ITField" visible="false" />
<add field="CCField" visible="true" />
</add>
<add name="Finance" >
<add field="ITField" visible="false" />
<add field="CCField" visible="false" />
</add>
</options>

The XML above builds the Drop Down List in the Column "Special" and assigns the behaviours for hiding and showing the fields "CCField" and "ITField" accordingly to their visibility attributes.



The Field "ITField" disappears if the "Call Center" Option is selected:

0 comments: