Forum Academy Marketplace Showcase Pricing Features

Restrict users to access own saved data

So I am starting to use a simple database where in it will show your previous text you type in the editor even on browser refresh.

So it will simply pull out the last item and display it

However, I have now users with sign up and login.

Say user 1 saved the document it will work and it will show his previous text even I refresh browser

But it will also the same case with user2 which will show whatever editext text the last user did on the editor.

I want it to display only the saved text that has been done by the user and not globaly for everyone

Thanks in advance

Hi there, @hirayaleads… if I understand your post correctly, it sounds like you need to add a constraint on the search that is pulling the last item from the data type where you are saving a user’s text, and that constraint is Created by = Current User. You should also consider adding a privacy rule to the data type that restricts access in a way that only a user who created the data can see it.

Hope this helps.


1 Like

IS this the rule you mentioned?

Yes, you should define a rule on that data type. Something like this…

created b current user worked! Thanks!

Do you also happen to know on automatically deleting DB entries? I just want to keep 5 entries or so so database is clean.

Since I just want to show the most recent saved text on browser refresh or login and nothing else

1 Like

I don’t know what you mean when you say you just want to keep 5 entries… is that 5 per user? If so, you could probably do something like add a step to the creation workflow that deletes the first thing in the data type for the user when a count of the number of things created by that user is greater than 5.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.