I am not aware that web2py has anything built in to do that. And it is a
tricky task - to do it properly you need all sorts of real time feedback
going to every grid that is already opened. It's conceptually not too hard
for grids that will be opened in the future - just set a flag when someone
starts to edit a record and clear it when they finish. But you would need
to do that yourself.

One thing that makes this problem worse (ie one user
overwriting another user's change) is that web2py writes *every* field in
the form to the database even if the user only changed a single field. So
even if two users edit two different fields of the same record, the last
person to save the record will overwrite all fields with their data - the
one they changed (good) and the ones they didnt change (bad)

___________________________
*www.TenOutOfTen.org* <https://www.TenOutOfTen.org>
rogers...@gmail.com
(+95) 09 250018669 (Myanmar)



On Wed, 25 Nov 2020 at 19:40, Yebach <vid.og...@gmail.com> wrote:

> Hello,
>
> how can I lock a record in a table (SQLform.grid) when somebody is editing
> one record so that other users cannot see it or it is grayed out or smth.
>
> Is there already an web2py ways or do I have to create a new filed set it
> as temp lock etc...
>
> thank you
>
> best regards.
>
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/461d3292-f56d-4773-80c3-2926f3b6f079n%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/461d3292-f56d-4773-80c3-2926f3b6f079n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CACWMBMNf34RWRJNm407G_O_PWqo1g2TdmcjX_9Ov%2B3_KeiHOuA%40mail.gmail.com.

Reply via email to