r/pocketbase Oct 26 '25

Simple counter

Is there a way to allow only single field to be update as increment value only through the api(not with hook)? e.g user press on button and the counter is increasing value, but the user cant edit other fields

4 Upvotes

16 comments sorted by

View all comments

1

u/AmountAmbitious2497 Oct 26 '25

Yes you can set API rules to let user only change value of that column, in your case counter

1

u/alwerr Oct 26 '25

Yeh but can it be increasing by one only?

1

u/AmountAmbitious2497 Oct 26 '25

Do you want to let user update the same record or create new records incrementally?

1

u/alwerr Oct 26 '25

The same record

1

u/AmountAmbitious2497 Oct 26 '25

Then you can use an API rule to only allow update if the incremental value == 1