Interface IField
- Namespace
- PnP.Core.Model.SharePoint
- Assembly
- PnP.Core.dll
Public interface to define a Field object of SharePoint Online
public interface IField : IDataModel<IField>, IDataModelParent, IDataModelWithContext, ISupportModules<IField>, IDataModelGet<IField>, IDataModelLoad<IField>, IDataModelUpdate, IDataModelDelete, IQueryableDataModel
- Inherited Members
- Extension Methods
Properties
All
A special property used to add an asterisk to a $select statement
object All { get; }
Property Value
AllowDisplay
Gets or sets whether to allow display if the user name
bool AllowDisplay { get; set; }
Property Value
AllowHyperlink
Gets or sets a value that specifies whether a hyperlink is allowed as a value of the field.
bool AllowHyperlink { get; set; }
Property Value
AllowMultipleValues
Gets or sets whether the lookup fields allows multiple values
bool AllowMultipleValues { get; set; }
Property Value
AnchorId
Gets or sets the GUID of the anchor Term object for a TaxonomyField
Guid AnchorId { get; set; }
Property Value
AppendOnly
Gets or sets a value that specifies whether all changes to the value of the field are displayed in list forms.
bool AppendOnly { get; set; }
Property Value
AutoIndexed
Gets or sets a Boolean value that specifies whether the field is auto-indexed
bool AutoIndexed { get; set; }
Property Value
CanBeDeleted
Specifies whether or not the field can be deleted
bool CanBeDeleted { get; }
Property Value
Choices
Gets or sets the choices of choice field
string[] Choices { get; set; }
Property Value
- string[]
ClientSideComponentId
Gets or Sets the client side component Id associated with the field
Guid ClientSideComponentId { get; set; }
Property Value
ClientSideComponentProperties
Gets or Sets the properties of the client side component associated with the field
string ClientSideComponentProperties { get; set; }
Property Value
ClientValidationFormula
Gets or Sets the validation formula
string ClientValidationFormula { get; set; }
Property Value
ClientValidationMessage
Gets or Sets the client validation message of the field
string ClientValidationMessage { get; set; }
Property Value
CreateValuesInEditForm
Gets or sets a Boolean value that specifies whether the new Term objects can be added to the TermSet while typing in the TaxonomyField editor control.
bool CreateValuesInEditForm { get; set; }
Property Value
CurrencyLocaleId
Gets or Sets the Locale Id of the currency
int CurrencyLocaleId { get; set; }
Property Value
CustomFormatter
Gets or Sets custom formatter of the field
string CustomFormatter { get; set; }
Property Value
DateFormat
Gets or Sets the Date Format Valid for DateTime field, Calculated field
DateTimeFieldFormatType DateFormat { get; set; }
Property Value
DateTimeCalendarType
Gets or sets the type of calendar to use of a DateTime field
CalendarType DateTimeCalendarType { get; set; }
Property Value
DefaultFormula
Gets or sets the default formula for a calculated field
string DefaultFormula { get; set; }
Property Value
DefaultValue
Gets or Sets the default value of the field
object DefaultValue { get; set; }
Property Value
DependentLookupInternalNames
Gets the dependent lookup internal names of a lookup field
string[] DependentLookupInternalNames { get; }
Property Value
- string[]
Description
Gets or Sets the description of the field
string Description { get; set; }
Property Value
Direction
Specifies the direction of the reading order for the field. A string that contains LTR if the reading order is left-to-right, RTL if it is right-to-left or none
string Direction { get; set; }
Property Value
DisplayFormat
Gets or Sets the display format of the field CAUTION: Is an integer value since according to field type, the display format enum may change
int DisplayFormat { get; set; }
Property Value
EditFormat
Determines whether to display the choice field as radio buttons or as a drop-down list
ChoiceFormatType EditFormat { get; set; }
Property Value
EnableLookup
Gets or sets whether the lookup should be enabled for computed field
bool EnableLookup { get; set; }
Property Value
EnforceUniqueValues
Gets or Sets whether the field enforces unique values
bool EnforceUniqueValues { get; set; }
Property Value
EntityPropertyName
Gets the name of the entity property for the list item entity that uses this field
string EntityPropertyName { get; }
Property Value
FieldTypeKind
Gets or Sets the field type kind of the field https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-server/ee540543%28v%3doffice.15%29
FieldType FieldTypeKind { get; }
Property Value
FillInChoice
Gets or sets whether choice field can be filled in by user
bool FillInChoice { get; set; }
Property Value
Filterable
Returns whether the field can be filtered
bool Filterable { get; }
Property Value
Formula
Specifies the formula that is used for calculation in the field
string Formula { get; set; }
Property Value
FriendlyDisplayFormat
Gets or sets the friendly format type of a DateTime field
DateTimeFieldFriendlyFormatType FriendlyDisplayFormat { get; set; }
Property Value
FromBaseType
Gets a Boolean value that indicates whether the field derives from a base field type.
bool FromBaseType { get; }
Property Value
Group
Gets or Sets the group of the field
string Group { get; set; }
Property Value
Hidden
Specifies whether the field is displayed in the list
bool Hidden { get; set; }
Property Value
Id
Provides the id of the field
Guid Id { get; }
Property Value
IndexStatus
Describes whether a field is indexed, and whether the data in the index is complete
FieldIndexStatus IndexStatus { get; }
Property Value
Indexed
Gets or Sets whether the field is indexed
bool Indexed { get; set; }
Property Value
InternalName
Specifies the internal name of the field
string InternalName { get; }
Property Value
IsAnchorValid
Gets a Boolean value that specifies whether the Term object identified by the AnchorId property is valid.
bool IsAnchorValid { get; }
Property Value
IsDependentLookup
Check whether a lookup field is a dependent lookup field
bool IsDependentLookup { get; }
Property Value
IsKeyword
Gets or sets a Boolean value that indicates whether the TaxonomyField value points to the Enterprise Keywords TermSet object.
bool IsKeyword { get; set; }
Property Value
IsPathRendered
Gets or sets a Boolean value that specifies whether the default Label objects of all the parent Term objects of a Term in the TaxonomyField object will be rendered in addition to the default label of that Term.
bool IsPathRendered { get; set; }
Property Value
IsRelationship
Specifies whether this Lookup field is discoverable from the List being looked up to
bool IsRelationship { get; set; }
Property Value
IsTermSetValid
Gets a Boolean value that specifies whether the TermSet object identified by the TermSetId property exists and is available for tagging.
bool IsTermSetValid { get; }
Property Value
JSLink
Gets or sets the name of an external JS file containing any client rendering logic for fields of this type
string JSLink { get; set; }
Property Value
LookupField
Specifies the name of the Field used as the lookup values
string LookupField { get; set; }
Property Value
LookupList
Specifies the id (GUID) of the List that contains the Field to use as the lookup values
string LookupList { get; set; }
Property Value
LookupWebId
Specifies the id of the Site that contains the List which contains the Field used as the lookup values
Guid LookupWebId { get; set; }
Property Value
Mappings
Gets the mappings of a choice field
string Mappings { get; }
Property Value
MaxLength
Specifies the maximum number of characters that can be typed in the field
int MaxLength { get; set; }
Property Value
MaximumValue
Gets or sets the maximum value of a number field
double MaximumValue { get; set; }
Property Value
MinimumValue
Gets or sets the minimum value of a number field
double MinimumValue { get; set; }
Property Value
NumberOfLines
Gets or sets a value that specifies the number of lines of text to display for the field.
int NumberOfLines { get; set; }
Property Value
Open
Gets or sets a Boolean value that specifies whether the new Term objects can be added to the TermSet while typing in the TaxonomyField editor control.
bool Open { get; set; }
Property Value
OutputType
Gets or sets the type of a calculated field output
FieldType OutputType { get; set; }
Property Value
Presence
Gets or sets whether to display the presence indicator of the user
bool Presence { get; set; }
Property Value
PrimaryFieldId
Specifies the GUID of the primary lookup field if this is a dependent lookup field. Otherwise, it is empty string
string PrimaryFieldId { get; set; }
Property Value
ReadOnlyField
Specifies whether values in the field can be modified
bool ReadOnlyField { get; set; }
Property Value
RelationshipDeleteBehavior
Specifies the Delete Behavior of the Lookup Field
RelationshipDeleteBehaviorType RelationshipDeleteBehavior { get; set; }
Property Value
Required
Gets or Sets whether the field is required
bool Required { get; set; }
Property Value
RestrictedMode
Gets or sets a value that specifies whether the field supports a subset of rich formatting.
bool RestrictedMode { get; set; }
Property Value
RichText
Gets or sets a value that specifies whether the field supports rich formatting.
bool RichText { get; set; }
Property Value
SchemaXml
Specifies the schema that defines the field
string SchemaXml { get; set; }
Property Value
Scope
Specifies the ServerRelativeUrl of the of the web site folder in which the field belongs to
string Scope { get; }
Property Value
Sealed
Specifies whether the field can be changed or deleted
bool Sealed { get; set; }
Property Value
SelectionGroup
Gets or sets the Id of the group to which the users to select belong to
int SelectionGroup { get; set; }
Property Value
SelectionMode
Gets or sets the selection mode of the user field
FieldUserSelectionMode SelectionMode { get; set; }
Property Value
ShowAsPercentage
Gets or Sets whether the field should be shown as percentage Valid for Number field, Calculated field
bool ShowAsPercentage { get; set; }
Property Value
ShowInFiltersPane
Represents status to determine whether filters pane will show the field
ShowInFiltersPaneStatus ShowInFiltersPane { get; set; }
Property Value
Sortable
Returns whether the field can be sorted
bool Sortable { get; }
Property Value
SspId
Gets or sets the GUID that identifies the TermStore object, which contains the Enterprise Keywords for the site that the current TaxonomyField belongs to.
Guid SspId { get; set; }
Property Value
StaticName
Specifies the static name of the field
string StaticName { get; }
Property Value
TargetTemplate
Gets or sets the Web-relative URL of the target page that is used to construct the hyperlink on each Term object when the TaxonomyField object is rendered.
string TargetTemplate { get; set; }
Property Value
TermSetId
Gets or sets the GUID of the TermSet object that contains the Term objects used by the current TaxonomyField object.
Guid TermSetId { get; set; }
Property Value
TextField
Gets or sets the GUID that identifies the hidden text field in an item.
Guid TextField { get; set; }
Property Value
Title
Gets or Sets the title of the field
string Title { get; set; }
Property Value
TypeAsString
Specifies the FieldTypeKind of the field as a string value
string TypeAsString { get; }
Property Value
TypeDisplayName
Specifies the display name for FieldTypeKind of the field
string TypeDisplayName { get; }
Property Value
TypeShortDescription
Specifies the description of the FieldTypeKind of the field
string TypeShortDescription { get; }
Property Value
UnlimitedLengthInDocumentLibrary
Gets or sets a value that specifies whether the field supports unlimited length in document libraries.
bool UnlimitedLengthInDocumentLibrary { get; set; }
Property Value
UserCreated
Gets or sets a Boolean value that specifies whether the TaxonomyField object is linked to a customized TermSet object.
bool UserCreated { get; set; }
Property Value
ValidationFormula
Specifies the formula referred by the field and gets evaluated when a list item is added or updated in the list
string ValidationFormula { get; set; }
Property Value
ValidationMessage
Specifies the message to display if validation formula fails for the field when a list item is added or updated in the list
string ValidationMessage { get; set; }
Property Value
Methods
NewFieldLocationValue(string, double, double)
Creates a new IFieldLocationValue object
IFieldLocationValue NewFieldLocationValue(string displayName, double latitude, double longitude)
Parameters
displayNamestringName to display for this location
latitudedoubleLatitude for the location
longitudedoubleLongitude for the location
Returns
- IFieldLocationValue
Configured IFieldLocationValue object
NewFieldLookupValue(int)
Creates a new IFieldLookupValue object
IFieldLookupValue NewFieldLookupValue(int lookupId)
Parameters
lookupIdintId of the lookup value
Returns
- IFieldLookupValue
Configured IFieldLookupValue object
NewFieldTaxonomyValue(Guid, string, int)
Creates a new IFieldTaxonomyValue object
IFieldTaxonomyValue NewFieldTaxonomyValue(Guid termId, string label, int wssId = -1)
Parameters
termIdGuidName of the term to set
labelstringLabel of the term to set
wssIdintOptionally provide the wssId value
Returns
- IFieldTaxonomyValue
Configured IFieldTaxonomyValue object
NewFieldUrlValue(string, string)
Creates a new IFieldUrlValue object
IFieldUrlValue NewFieldUrlValue(string url, string description = null)
Parameters
Returns
- IFieldUrlValue
Configured IFieldUrlValue object
NewFieldUserValue(ISharePointPrincipal)
Creates a new IFieldUserValue object
IFieldUserValue NewFieldUserValue(ISharePointPrincipal principal)
Parameters
principalISharePointPrincipal
Returns
- IFieldUserValue
Configured IFieldUserValue object
NewFieldUserValue(int)
Creates a new IFieldUserValue object
IFieldUserValue NewFieldUserValue(int userId)
Parameters
userIdintId of the user
Returns
- IFieldUserValue
Configured IFieldUserValue object
NewFieldValueCollection()
Creates a new collection to hold IFieldValue objects
IFieldValueCollection NewFieldValueCollection()
Returns
NewFieldValueCollection(IEnumerable<IFieldValue>)
Creates a new collection to hold IFieldValue objects
IFieldValueCollection NewFieldValueCollection(IEnumerable<IFieldValue> fieldValues)
Parameters
fieldValuesIEnumerable<IFieldValue>Collection of field values to add
Returns
NewFieldValueCollection(IEnumerable<KeyValuePair<Guid, string>>)
Creates a new collection to hold IFieldTaxonomyValue objects
IFieldValueCollection NewFieldValueCollection(IEnumerable<KeyValuePair<Guid, string>> fieldValues)
Parameters
fieldValuesIEnumerable<KeyValuePair<Guid, string>>Collection of field values to add
Returns
SetShowInDisplayForm(bool)
Configure the visibility of the field in a Display form
void SetShowInDisplayForm(bool show)
Parameters
showboolTrue when the field will be configured as visible (= default), false otherwise
SetShowInDisplayFormAsync(bool)
Configure the visibility of the field in a Display form
Task SetShowInDisplayFormAsync(bool show)
Parameters
showboolTrue when the field will be configured as visible (= default), false otherwise
Returns
SetShowInEditForm(bool)
Configure the visibility of the field in a Edit form
void SetShowInEditForm(bool show)
Parameters
showboolTrue when the field will be configured as visible (= default), false otherwise
SetShowInEditFormAsync(bool)
Configure the visibility of the field in a Edit form
Task SetShowInEditFormAsync(bool show)
Parameters
showboolTrue when the field will be configured as visible (= default), false otherwise
Returns
SetShowInNewForm(bool)
Configure the visibility of the field in a New form
void SetShowInNewForm(bool show)
Parameters
showboolTrue when the field will be configured as visible (= default), false otherwise
SetShowInNewFormAsync(bool)
Configure the visibility of the field in a New form
Task SetShowInNewFormAsync(bool show)
Parameters
showboolTrue when the field will be configured as visible (= default), false otherwise
Returns
UpdateAndPushChanges()
Updates the field and pushes changes down to lists consuming this field
void UpdateAndPushChanges()
UpdateAndPushChangesAsync()
Updates the field and pushes changes down to lists consuming this field
Task UpdateAndPushChangesAsync()
Returns
UpdateAndPushChangesBatch()
Updates the field and pushes changes down to lists consuming this field
void UpdateAndPushChangesBatch()
UpdateAndPushChangesBatch(Batch)
Updates the field and pushes changes down to lists consuming this field
void UpdateAndPushChangesBatch(Batch batch)
Parameters
batchBatchBatch to add this request to
UpdateAndPushChangesBatchAsync()
Updates the field and pushes changes down to lists consuming this field
Task UpdateAndPushChangesBatchAsync()
Returns
UpdateAndPushChangesBatchAsync(Batch)
Updates the field and pushes changes down to lists consuming this field
Task UpdateAndPushChangesBatchAsync(Batch batch)
Parameters
batchBatchBatch to add this request to