Learn how to get a list item from a site and display the list item data in the DataZoom web part.
Prerequisites
This example requires a SharePoint list named 'City' to exist in the current site. The 'City' list must have two fields: Title and State. In this example the State field is a single line text value limited to 2 characters.

Syntax
| Get List Item | Copy Code |
|---|---|
|
## Get the links list #set( $list = $web.lists.get_item("City") ) ## Get the list item #set( $listItem = $list.GetItemById(1) ) <br> <u><strong>List Item</strong><u> <blockquote> ID: $listItem.ID<br> <br> Unique ID: $listItem.UniqueId<br> <br> Title: $listItem.Title<br> <br> Name: $listItem.Name<br> <br> State: $listItem.get_item("State")<br> </blockquote> | |
Output
