Creating Read-only views

0
We have a form that allows users to enter in data.  When someone is editing a particular record and someone else tries to open the same record we need them to see a read-only version of the form.  I thought it would be simple and opened the properties for the data view that all the controls are in but Editable is just yes or no, there is no way to add conditions to editability. I really do not want to have to create a duplicate page where it is read only(or even a duplicate data view on the same page with visibility conditional).  I believe each individual control has conditional editability but that is much more work than just doing it at the data view level.  It seems like there must be a better way to do this. Any ideas?
asked
3 answers
2

IOP Easiest would be to duplicate the page, one editable page one read-only page.
To reduce code duplication you can put all widgets inside the data view in a snippet that is used on both pages.

-Andrej

answered
0

Ryan, unfortunately the dataview has no possibilities for conditional editability. I saw you already filed a Idea for that, which I supported.

An alternative is setting an association  between account and your entity before editing and set up entity access on the entity that a user is only allowed to edit when associated with their account and otherwise read.  Drawback is when users cancel or close the browser page and your ‘lock’ is not released. But that way you don't require duplicate pages or conditional editability on all attributes.

answered
1

Hi Rayan,

You could use the same form and use entity security. But I am not sure if this makes it much easier to model.

Cheers, Andries

answered