Users editing/deleting their own Airtable records

I’m setting up a Softr website which essentially enables users to submit classifieds via a Typeform embed, which then gets sent as a record through to Airtable and then shown on my Softr website.

Is there any advice on the best way to then enable users to delete or even edit their own classifieds records? I would only want them to be able to delete/edit their own records (not any submissions from other users!).

1 Like

I have a similar system - users are tied to airtable records and each have a unique ID (a field I call SOFTR-USER-ID), this ID is a linked field to each entry (in your case classifieds) - and I use a conditional field in the Softr table to only show records where ‘SOFTR-USER-ID’ = logged-in users ‘SOFTR-USER-ID’

Then when they log in, they can only edit the entries that show up in the conditional. Be careful with what fields you allow them to edit though, any editable linked fields will allow them to see ALL entries (e.g. a list of all SOFT-USER-IDs, and can add random people to their classified). If you just let them edit text fields it should work fine.

@HarwellXPS’s solution is perfect for filtering who can see which records to then edit. If you want users to be able to see ALL records, but only edit the ones they “own,” then you can follow the same logic to set record-level permissions for who can edit which fields.

I know Softr is planning a big update to this process and system soon, which will include permissions for who can delete certain records as well, but when setting up the edit permissions, you should see a toggle for record level permissions. If you toggle this OFF, you will have the option to set conditions for who can edit which records from that table. The example below shows where people can only edit the table if the record title is the record title of the logged-in user. In other words, if they are they are the person whose bio they are looking at. In your case you would want to set these conditions so that the users can only edit records where ‘SOFTR-USER-ID’ = logged-in users ‘SOFTR-USER-ID’ (and you would want to make sure that unique ‘SOFTR-USER-ID’ is linked to the classifieds table as @HarwellXPS suggests.

Screen Shot 2022-09-14 at 7.15.33 AM

Even if you limit the record view with filters as @HarwellXPS suggests, I would still recommend setting the edit permissions to ensure the app is secure since these edit permissions are set at the server.

1 Like

Thanks! This makes a lot of sense. The Unique ID you’re talking about - how have you gone about “setting” this for the member in Softr? I was thinking of using the user’s email address as the Unique ID, but this is something that can change as the user might get a new email address etc, so might not actually be ideal.