In this blog article, I am going to describe all the steps required to get SharePoint list field values by using SharePoint Framework model which is SPFx.

If you are already familiar with SPFx then you might have a better understanding on SPFx application customizer.

If you are new to SPFx then please go through this below-mentioned link from where you can get a better understanding on SPFx model.

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/sharepoint-framework-overview

In this below-mentioned code example, I have taken application customizer of SPFx. I have also used PnP JavaScript library. The Patterns and Practices JavaScript Core Library was created to help developers by simplifying common operations within SharePoint and the SharePoint Framework.

To get more detailed information about PnP javascript library, please follow this link,
https://github.com/SharePoint/PnP-JS-Core.

This below-mentioned code example is very simple and straight forward. At first, you have to import ‘sp-pnp-js’ namespace, then you can use PnP library in code to retrieve SharePoint list and its field values.

This code snippet will help you to retrieve any column values of all list items present under a particular list. You just have to provide your list title and list field/column internal name in the following line,

pnp.sp.web.lists.getByTitle(“My List”).items.select(“Title”, “Id”, “CustomField_1”, “CustomField_2”).getPaged()

In the above piece of code “My list” is SP list title and “Title”, “Id”, “CustomField_1”, “CustomField_2” are list field/column internal names.

Accordingly you can change these values on your end,

SharePoint 2013 Hosting Recommendation

HostForLIFE.eu’s SharePoint 2013 Hosting solution offers a comprehensive feature set that is easy-to-use for new users, yet powerful enough for the most demanding web developer expert. Hosted SharePoint Foundation 2013 is the premiere web-based collaboration and productivity enhancement tool on the market today. With SharePoint 2013 Foundation, you can quickly access and manage documents and information anytime, anywhere though a Web browser in a secure and user friendly way. SharePoint hosting services start at only at €9.99/mo, allowing you to take advantage of the robust feature set for a small business price. HostForLIFE.eu offers a variety of hosted SharePoint Foundation 2013 plans as well as dedicated SharePoint 2013 Foundation options

recommended windows hosting