Quickly build a personalised list within your app

After the recent roadmap webinar (embedded below) a few customers asked how they can create a personalised list within their app. This post will explain how.

  1. create a registration screen called ‘Registration’ with a registration form, include an ‘email’ field and any other fields you want
  2. ensure the form saves to a ‘users’ data source
  3. create a sign in screen called ‘Login’ and add the login component. Link the login component to the ‘users’ data source
  4. create a new screen called ‘Manage task’ and add a ‘task creation’ form. Add the following fields:
  5. task name
  6. notes
  7. email make sure this field is hidden, set the default value type to ‘user profile data’ and set the default key to ‘email’ This will ensure the logged in user’s email address is always saved into the data source so we can ignore tasks from other users.
  8. Ensure the task creation form saves to a ‘tasks’ data source
  9. create a new screen called ‘My tasks’ and add a List from data source component. Link it to the ‘tasks’ data source and setup the data view settings to display the relevant task information in the list
  10. Under ‘How do you want to filter your list’ filter the email field so that it equals the value type ‘user profile data’ and set the value for to ‘email’. This will ensure the list is automatically filtered by the logged in user’s email address
  11. Switch to preview mode then
  12. register and login to your app
  13. create a task, you should not see the ‘email’ field as it’s hidden
  14. view ‘My tasks’, you should be able to see the task you created
  15. click ‘Reset preview’ on the right of the preview window in Studio to clear your logged in data
  16. register with a new email address, login, create a new task and ensure you can only see tasks created by this user. If you cannot see the tasks for other users your form and list from data source are working correctly and only showing the current user their tasks! Congratulations!

Additional steps you should do before sharing your app with other users:

  1. Setup app security rules to ensure only logged in users can access the my tasks and manage task screen
  2. Setup data source security rules to ensure data is limited to specific users. Ensure the email field is required to ensure the app must provide an email in order to query the data source