Best practices to filter task created by a user

Hi there a bit new to Softr.io still. I am wondering if I do things right.

I am using softr database and still on the free plan.

I have a user table created that is synced with the Users overview in the users and authentication module.

I also have a table for tasks. In that table I added a related field to the user table: REF_User

Then I have a form to create a task. I added a hidden field which is the record ID of the logged in user.

Task is created and user that is the creator is linked.

Then I added a list view of tasks. This I want to filter based on de logged in user, but when I do:

Task.REF_User includes any off logged_in_user.email this is not working. I need to pick a property of the user table, but can’t select record ID of logged in user.

But then I added a lookup field to the tasks table which is the E-mail of the user: User - Email

When I now filter tasks like:

Task.User-Email includes any of logged-in-user.email the filter works.

But for me it feels a bit cumbersome to need to use a lookup field for this.

Can someone tell me I.my current approach is correct or tell me if there a better approach to follow.

Thanks!

Hi @FJPH,

Please note that for conditional filters to work correctly, the values of the fields used in the filters must match.

For example, if you store record IDs in the Task.REF_User field, comparing it with the logged-in user’s email will not work. Even if the record ID and email belong to the same user, they are different strings and cannot match.

If you want to use record IDs in conditional filters, follow these steps:

  1. Go to your Users table and create a new Record ID field. Make it the primary field of your table (as shown in the screenshot).

  2. Link the Users and Tasks tables by creating a relation field.

  3. In your form block, add a hidden field to capture the logged-in user’s Record ID and map it to the relation field you created.

  4. On the page with the list block to show tasks, add a conditional filter that uses the Record IDs.

This ensures the filter will correctly match tasks to the logged-in user.