The ShortPoint Connect feature is used to connect to a group of items in the SharePoint list or library and display it on the SharePoint page.
In this article, we will show you how to create a page to display a single SharePoint list item. This solution will make it possible to display different content on the same page based on the existing list item. The content will depend on the query string parameter in the URL.
Using this solution, you will be able to retrieve specific information from a SharePoint list/library to show it in a visually appealing design by ShortPoint. For example, you can show the data from the description column of your Announcements list:
This is how it may look like on the page:
By changing the ID value of the announcement item in the query string of the page URL, you will see the details of different announcements, while still being on the same page:
It is possible to achieve this result using the REST API connection type. Please follow the steps below.
TABLE OF CONTENTS
- Step 1: Configure the SharePoint list/library view
- Step 2: Prepare a SharePoint page that will store data
Step 1: Configure the SharePoint list/library view
1.1. Add ID column to a SharePoint list/library view
1.2. Get the SharePoint list/library ID
Step 2: Prepare a SharePoint page that will store data
2.1. Create a new page
2.2. Add an itemID parameter to the page URL
You will need to add the itemID value of the existing item from the SharePoint list to the page URL. It will look similar to:
/SitePages/content-page-name.aspx will show your current page path.
Note: If you are still in the page edit mode, the URL will look a bit different, as it already has one query parameter ?Mode=Edit. In such case simply add the itemID parameter using the &, like this:
2.3. Add a ShortPoint Design Element
In this example, we are using Text Design Element to store the data from the SharePoint list/library column. You may use any other Design Element.
2.4. Connect REST API to the created Design Element
Note: Find out more about ShortPoint connection in this solution article: ShortPoint Connect: Basic Tutorial.
var search = window.location.search; var params = new URLSearchParams(search); var itemID = params.get('itemID'); return parameters += "?$filter=ID eq '" + itemID + "'";
Note: find out more about mapping the items in this solution article: ShortPoint Connect: Basic Tutorial.
Note: Review our Custom CSS basic and advanced tutorials on how to style your Design Elements with custom CSS, and check Custom CSS solutions folder, where you may find some nice examples of styling.
- If you need to edit the connection, do not forget to add the itemID to the page URL while doing that (as in the Step 2.2). Otherwise, you will not see any results.
- Do not restrict user access to this page as this will lead to data not displayed in the connections either.
That's it. Now you have a single page that can display different content based on the existing list item.
You can also use this created page for displaying content from a specific column, for example in a lightbox. Please continue to the Step 2 of How to Display Content from a Sharepoint List/Library Column in a Lightbox solution article.