LinkToForm: Make preset value for new record shown but protected (not editable)

Is there a chance to make a given form value on a new record be shown but not editable?
Context:
User click a LINKTOFORM action, for a new entry to a form with at least one given value, set by the action. The user should be able to see the value but not be able to edit it.

Solved Solved
0 4 158
1 ACCEPTED SOLUTION

Please try setting FALSE in the editable_if setting of the column.

Ticking off the editable_if makes the column totally non editable.

Setting it FALSE will make non editable for users but editable for underlying expressions.

View solution in original post

4 REPLIES 4

Please try setting FALSE in the editable_if setting of the column.

Ticking off the editable_if makes the column totally non editable.

Setting it FALSE will make non editable for users but editable for underlying expressions.

Thanks, got it. Uncheck the editable checkbox and the expression "false" is not the same. The unchecked editable setting doesn't even allow to insert anything, while the expression false allows inserts but not edits.


@stefanasks wrote:

The unchecked editable setting doesn't even allow to insert anything, while the expression false allows inserts but not edits.


Just to make sure your understanding is completely clear:

If Show? is OFF, the column value cannot change at all, ever, by any means, except when set by an Initial value when the row is first added.

If Show? is set to an expression that evaluates to FALSE, the user can never edit the column's value, as in a form view or with Quick Edit, but the column value can still be changed by Initial valueReset on edit?, or with actions.

A hack that I've used for this is to make use of context to detect when we're inside the form, and make things not editable once it's not blank; 

If(Context("ViewType") = "form",

IsBlank([_this]),

True)

This way everywhere outside of the form the system has free access and there's nothing restricting when the column can be edited; but when we're inside the form you can only edit that field when it's empty, so as soon as you put something inside it and you exit the field it locks itself down. You can still see it because it's visible, but it's grayed out and uneditable now - you only have the opportunity to modify it when you first get there and it's empty. If you prefill it using an action or formula or whatever, then when you get inside the form you won't be able to modify the value (but you'll still be able to see it).