Noloco
Ask the CommunityHire an ExpertLoginSign up
  • Noloco Overview
  • 🚀Quickstart
    • Start with your data
    • Start with AI
    • Start with a template
  • Data to App
    • Database Consolidation
  • App Settings
  • Components
    • Containers
    • Video
  • Templates
  • 🔗Data Sources
    • Data Overview
      • Setting a Collection's Primary Field
      • Syncing
    • Noloco Tables
      • Field Types
      • Relationships
      • Automatic Links
      • Rollup Fields
      • Lookup Fields
      • Formulas
      • Noloco AI
      • Import a file
    • Airtable
    • Google Sheets
    • SmartSuite
    • MySQL
    • PostgreSQL
    • REST APIs
    • HubSpot
    • Xano
  • 📄Pages
    • Collection views
      • Show collection record count
      • Empty State
    • Blank pages
    • iFrame embeds
    • External links
    • The Home Page
    • User Profile Page
    • Parent pages & folders
    • Page visibility rules
    • Cloning pages
    • Renaming pages
    • Hiding pages
    • Sidebar dividers
    • Tabs
  • 📂Collections
    • Adding collection views
    • Display
      • Rows
      • Cards & columns
      • Tables
      • Kanban boards
      • Calendar
      • Timeline
      • Gantt
      • Split-view
      • Charts
      • Maps
      • Pivot Table
      • Single record view
      • Grouping records
      • Record Colors
    • Filters
      • Logged in user
      • Relative Filters
      • Record values
    • Filter fields
    • Sort & limit
    • Row Action
    • Column Summaries
  • 📝Forms
    • Forms
      • Customizing Form Fields
      • Passing Linked Record Values to a Form
      • Dynamic Form Field Filters
      • E-Signature Fields
    • Public Forms
  • 📃Record Pages
    • Overview
    • Visibility Settings
    • Hidden Field Values
    • Record Comments
  • ✏️Field Formatting
    • Field visibility conditions
    • In-line editing
    • Conditional Highlight Colors
    • Dates & Time Zones
  • 📊Charts
    • Overview
  • 📂Data Management
    • Export Data
    • Import Data
  • 👥Users & Permissions
    • User Table
    • User Management
    • User Roles & Permissions
      • Record-level permissions
      • Field-level permissions
    • Open Sign Up
    • Offboarding Users
    • Testing as other users
  • ⏩Actions
    • Action buttons
      • Create records
      • Update records
      • Bulk actions
      • Barcode Scanner
      • Add a Comment Action
  • ⚡Workflows
    • Workflows
      • On-demand workflows
      • Comment Added Trigger
      • Watched Fields
      • Trigger webhooks
      • Send automated emails
      • For each item in a list...do...
      • Only continue if
      • Create a Record Action
      • Update a Record Action
      • Delete a Record Action
      • Deactivate a User Action
      • Reactivate a User Action
      • Send an Invitation Email Action
      • Add a comment to a record
      • Send a Push Notification
      • Ask Chat GPT Action
      • Summarize Text Action
      • Correct Grammar Action
      • Extract Keywords Action
      • Analyze Sentiment
      • Finish Text Action
      • Send a message to a Slack Channel
      • Send a message to a Slack User
      • Generate a PDF with DocsAutomator
  • 🔔Notifications
    • Notifications
    • Notification Preferences
  • 📑API Documentation
    • API Overview
      • Fetching Records
      • Fetching a Record
      • Creating a Record
      • Update a Record
      • Deleting a record
  • ⚙️Settings
    • General Settings
      • Live Mode
      • Custom Logos
    • Theme & Design
    • Progressive web apps
    • Navigation Settings
    • Spaces
    • Email Settings
    • Custom Code
    • Custom Domain
    • Login & Signup
      • Sign in Options
      • Single Sign On
      • 2FA - Two Factor Authentication
      • Client Portal User Add-On
    • Login Screen
    • User Lists
    • Integrations & API Keys
    • Billing & Usage
    • Support
    • Publishing
      • App Version History
  • 🔄Integrations
    • Zapier
    • Make (Integromat)
    • Sign in With Google
    • Intercom
    • SMTP Emails
    • Documint
  • ⚙️Account
    • Workspaces
    • Pricing
      • Client Portal Add-on (Legacy)
    • Transferring an App
    • Onboarding Call Preparation
Powered by GitBook
On this page
  • When should I use filters vs record-level permission rules?
  • How do I filter records by the logged in user if I'm using an external data source?
  • Example filter based on the logged in user
  1. Collections
  2. Filters

Logged in user

Set up filters on record collections based on the logged in user.

PreviousFiltersNextRelative Filters

Last updated 7 months ago

We often want to create collection views where we filter records by the logged in user. This enables us to only show specific records that are associated with the logged in user.

In this video, learn how to:

  • Set up filters based on the logged in user

  • Preview as another app user to test these filters

  • Set up filters when using a User List

  • Choose between filters and record-level database permission rules

  • Set up record-level permission rules to control record access at database level

When should I use filters vs record-level permission rules?

If you're happy for your app users to be able to access all records in a particular collection but you also want to create a view that filters the records to only show those associated with the app user, then collection filters will work well for your use case.

How do I filter records by the logged in user if I'm using an external data source?

If you're using an external data source (like Airtable, PostgreSQL etc.), you can still filter data based on the logged in user as long as your data collections are set up in one of two ways:

  1. You have created a relationship field between the relevant collection you want to filter on and the Noloco User table

Example filter based on the logged in user

Once you're happy that the necessary relationships are in place to link Noloco Users to the relevant collection, you can then filter the collection view based on the 'Logged in User'.

In the below example we are applying a filter on the Properties collection. We only want to show the logged in user (or Estate Agent in this case) their assigned Properties.

We talk through this specific example in the video linked above.

As shown in the video above, filters only prevent certain records from being displayed to the user on a particular collection view. If you only ever want users to be able to access specific records, you should set up record-level to restrict access at the API layer.

However, if your app has data that only some users should be able to access, then you should set up record-level to restrict data access. Database permission rules will override any filters you have set on your collection views. In other words, if you've set permission rules that determine that a user with a particular role shouldn't be able to access particular records, those records will never be shown to the user in your app.

You have relationship fields linking the relevant collection and a Users table in your external data source and you have connected a to sync your users information from your external Users table into the Noloco User table. If you watch the video above, you'll see that our demo real estate app is set up in this way, where we have an Airtable collection of Estate Agents that's related to the Properties collection. We have added a User List to sync the user information from our Estate Agents table to the Noloco User table.

📂
permissions
permissions
User List