Watch the video or read the article below
A discussion list offers the following features:
- Users can produce content and add it to the discussion.
- Users can like, bookmark, and comment on content.
- Users can edit their own content.
To create a news feed or discussion list you will need to:
- Create a screen with the list from data source component.
- Link it to a data source.
- Turn on all the social features.
- Turn on the edit entry features.
- Test the discussion list in preview mode.
Step 1 – Create a screen with the list from data source component
- Click on the blue “Add screens” button in the bottom left corner.
- Select the “Lists” option from the list of options at the top of the page.
- Click on the “List – news feed” template or the “List – discussion forum” template. You can select either of these two layouts.
- Click the blue “Add 1 new screen” button.
- Name it “Discussion” or “Newsfeed” and click “Add screen”.
Step 2 – Link it to a data source
- Open the component settings and click the button to “Create list data” or “Use Existing data”.
- For this example, “Create list data” and open the data source. Click on the “Add new field” button at the bottom if you wish to add more fields to the data.
- The data source comes with sample data. Required: Click on the “Add new field” button and add a field called “Email”.
- Add or remove columns depending on what data you want to include in the list.
- If you add/remove data, you need to update the data view settings. For more information about data view settings, read this article.
Step 3 – Turn on all the social features
- Go back to the settings.
- Scroll down until you see the “Social features” dropdown.
- Select “likes”, “bookmarks” and comments.
- For comments, the app needs to have a login so the app can recognize which user posts the comment.
- If you selected “comments”, you need to identify which data source you are storing all of the user’s information. (For example, choose the “Registration” data source.)
- Under “Username data fields” type in the field which holds the user’s name. If you have two fields for the user’s name that are represented in two separate columns for first and last names, type in both names.
- Under “User email data field” select the field which holds the user’s email address in the login data source.
- Under “User email data field”, select which field you would like the user’s photo to appear in, or if you do not want to use photos, choose “Don’t show user photos from the dropdown.
Step 4 – Turn on the edit entry features
- In the settings, click on the “Entry management” dropdown.
- Select the “Add list items” option.
- If you chose the discussion template earlier, select “Everyone can add”. For a news feed, select “Everyone can add” or “Only admins can add” if you wish to restrict it to admins.
- Select the screen where the user can manage the content. To learn how to set up a screen to manage content read this article.
- Select “Edit list items”
- Select “Users can edit their own list items” so that only the user can edit their own work. Select the “Email” field from the “Select a data field” options.
- Select the screen where the user can manage the content again.
- Select “Delete list items”.
- Select “Users can delete their own list items”.
- Select the “Email” field from the “Select a data field” options.
- Click “Save and Close”
Step 5 – Test the discussion list in preview mode
- Go to “Preview” mode.
- Click on one of the list items and try to like, bookmark, and comment. You will need to be logged in to comment. The test was successful if you were able to do all three when logged in.
- Test to submit a new discussion by clicking the + and confirming you are taken to the correct screen.
- Test the edit functionality. If users should only be able to edit their own items, test that only those items are editable.
- Test the delete functionality.