kamagra how much to take

Show Whether A SharePoint Field Contains Metainformation

This is a small code sample that will show you how to determine whether a SharePoint field contains meta information.

  1. public static bool SharePointFieldHoldsMetaInformation(SPList list, string internalFieldName)
  2. {
  3.         bool containsFlag = false;
  4.         try
  5.         {
  6.                 if (list == null)
  7.                 {
  8.                         return containsFlag;
  9.                 }
  10.                 SPField exampleField = list.Fields.GetFieldByInternalName(internalFieldName);
  11.                 if (exampleField == null)
  12.                 {
  13.                         return containsFlag;
  14.                 }
  15.                 switch (exampleField.Type)
  16.                 {
  17.                         case SPFieldType.Lookup:
  18.                         case SPFieldType.Calculated:
  19.                         case SPFieldType.User:
  20.                         return true;
  21.                 }
  22.                 return false;
  23.         }
  24.         catch
  25.         {
  26.                 return false;
  27.         }
  28. }
Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>