top of page
Search
Writer's pictureYaseen Nisar

Exploring SharePoint List Data Types: Making the Most of Your Information

Updated: Oct 4, 2023


SharePoint, a versatile platform for collaboration and document management, offers an array of powerful features to streamline business processes. One of its fundamental building blocks is the SharePoint list, which allows you to collect, store, and manage data efficiently.




To make the most of your SharePoint lists, it's crucial to understand the various data types available and how to use them effectively. In this blog post, we'll delve into SharePoint list data types and explore how they can enhance your data management capabilities.




Patch Syntax


You can create new items or you can update existing items

  • For new items you would typically use the following code

Patch(List, Defaults(List), {....})

  • For existing items you could use something like:

Patch(List, First(Filter(List, ID = 1)), {...})

  • Or you could use the lookup function instead.

Patch(List, Lookup(List, ID = 1), {...})


Single line of text


  • This data type is ideal for short, simple pieces of text, such as names, addresses, or titles.

  • You can set character limits and enforce data validation with regular expressions.

Patch(

List,

Defaults(List)/LookUp(‘List', ID=1),

{

Name: “Zeeshan“,

name : TextInput_Name.Text

}

)


Multiple Lines of Text


  • Use this for longer text entries, like descriptions or comments.

  • Customize the number of lines visible in the field and enable rich text formatting if needed

Patch(

List,

Defaults(List)/LookUp(‘List', ID=1),

{

MultipleLinesOfText: "Multiple Lines" & Char(10) &"Of Text Value“,

Notes: TextInput_Notes.Text

}

)


Choice Column


  • The choice field allows you to create predefined lists of options, enabling users to select from a dropdown menu.

  • It's handy for standardizing data and ensuring consistency.

Patch(

‘List',

Defaults(List)/LookUp(‘List', ID=1),

{

Choice: {

Id:Gallery1.Selected.ID,

Value:Gallery1.Selected.Title

}, Status: Combobox_Status.Selected,

Status: Dropdown_Status.Selected,

Status: Radio_Status.Selected.Value

}

)


Multi Choice Column


Patch(

‘List',

Defaults(List)/LookUp(‘List', ID=1),

{

ColorsChoice:

[

{Value: "Red"},

{Value: "White"},

{Value: "Blue"}

],

ColorsChoice: ComboBox_Colors.SelectedItems

}

)


DateTime Column


  • Use this data type to capture date and time information.

  • You can configure it to display only the date or include the time as well.

Patch(

List,

Defaults(List)/LookUp(‘List', ID=1),

{

VacationStartDateTime:DateTimeValue("20201-13T15:16Z"),

VacationStartDateTime: Date(2020,12,25) + Time(9,30,0),

VacationStartDateTime:

DatePicker_VacationDate.SelectedDate

+ Time(

Value(Dropdown_Hours.Selected.Value),

Value(Dropdown_Minutes.Selected.Value),

0

)

}

)


Date Column


Patch(

List,

Defaults(List)/LookUp(‘List', ID=1),

{

DateAndTime: Date(2020, 1, 13),

DateAndTime: Now(),

VacationDate: DatePicker_VacationDate.SelectedDate

}

)


Person or Group Column

  • Perfect for fields where you need to associate individuals or groups with specific tasks or responsibilities.

  • Provides easy access to user profiles and email addresses.

Patch(

‘List',

Defaults(List)/LookUp(‘List', ID=1),

{

Manager: ComboBox_Person.Selected,

Manager : [{

Claims: cmbOwner.Selected.Claims,

Department: cmbOwner.Selected.Department,

DisplayName: cmbOwner.Selected.DisplayName,

Email: cmbOwner.Selected.Email,

JobTitle: cmbOwner.Selected.JobTitle,

Picture: cmbOwner.Selected.Picture

}]

)

}

)


Group Column


Patch(

‘List',

Defaults(List)/LookUp(‘List', ID=1),

{

EmployeePerson: ComboBox_Person. SelectedItems,

Person: {

Claims: cmbOwner.Selected.Claims,

Department: cmbOwner.Selected.Department,

DisplayName: cmbOwner.Selected.DisplayName,

Email: cmbOwner.Selected.Email,

JobTitle: cmbOwner.Selected.JobTitle,

Picture: cmbOwner.Selected.Picture

}

Person: {

Claims: cmbOwner.Selected.Claims,

Department: cmbOwner.Selected.Department,

DisplayName: cmbOwner.Selected.DisplayName,

Email: cmbOwner.Selected.Email,

JobTitle: cmbOwner.Selected.JobTitle,

Picture: cmbOwner.Selected.Picture

}

}


Number Column

  • SharePoint offers several numeric data types, including Integer, Decimal, and Currency.

  • Choose the appropriate one based on the data you need to store, such as whole numbers or decimal values.

Patch(

List,

Defaults(List)/LookUp(‘List', ID=1),

{

Number: 1234,

Score: Value(TextInput_Score.Text),

Score: Dropdown_Score.Selected.Value,

Score: Slider_Score.Value

}

)



Yes/No Column

  • Ideal for fields that require a binary choice, like "Yes" or "No."

  • Commonly used for checkboxes or true/false scenarios.

Patch(

List,

Defaults(List)/LookUp(‘List', ID=1),

{

YesNo: true,

Completed: Toggle_Completed.Value,

Completed: If(

Dropdown_Completed.Value="No", false,

Dropdown_Completed.Value="Yes", true

)

}

)


Hyperlink or Image Column


  • This data type allows you to store URLs, making it easy to link to external resources or display images.

  • Great for creating navigation-friendly lists.

Patch(

List,

Defaults(List)/LookUp(‘List', ID=1),

{

WebsiteHyperlink: https://www.google.com,

WebsiteHyperlink: TextInput_Website.Text

}

)


Image Column


Patch(

'Travel Expenses',

Defaults(List)/LookUp(‘List', ID=1),

{

AnimalImages: 'Business-Cat‘,

AnimalImage: AddMediaButton1.Media

AnimalImage: PenInput1.Image,

AnimalImage: Camera1.Photo

}

)


Currency Column


Specifically designed for currency values, with built-in formatting and precision.


Patch(

List,

Defaults(List)/LookUp(‘List', ID=1),

{

Currency: 1234.50,

TotalAmountCurrency: Value(TextInput_TotalAmount.Text)

}

)


MetaData Column


Enables you to create hierarchical taxonomies for classifying and organizing data.


Patch(

'Travel Expenses',

Defaults(List)/LookUp(‘List', ID=1),

{

Label: "label",

Path: "",

TermGuid: "d30784d3-f4dc-46e2-b3ed-577b9ae5bea9",// Replace with term guid

Value: "",

WssId: 0

}

)


Lookup Column

  • A powerful data type that establishes relationships between lists.

  • Use it to create dependencies and link related data from different lists.

Patch(List,

Defaults(List)/LookUp(‘List', ID=1),

{

BranchLocationLookUp:

{

Id: 2,

Value: "Minneapolis, MN"

},

BranchLocationLookUp:

{

Id: 2,

Value: LookUp('Branch Locations', ID=2, Title)

},

BranchLocationLookUp: ComboBox_BranchLocation.Selected

}

)


Unsupported Columns


Calculated Column

External Data Column

Location Column


FAQs

What are SharePoint List Data Types?

How can I store dates and times in SharePoint lists?

Can I change the data type of a column after it has been created?

How can I enforce data validation using data types in SharePoint lists?

Are there any limitations to the use of certain data types in SharePoint lists?




Recent Posts

See All

Comments


bottom of page