Lock key/label field?

After finally figuring out what my issue was with why I couldn’t keep a field set as the key/label, I have a new pain point. Since there is a formula in the initial value for this field that is acting as the key/label, I can’t locked it down so it doesn’t come across as an editable field.

The formula is concatenate’s the first name, last name, and company with a " | " between the last name and company. I would prefer that this is locked and is formulated to complete that information without action by the User. First name, last name, and company are all independent fields the User inputs.

Is this possible? Or, since it is the key/label, have I lost that capability?

Key and label are not related.

The label column value–so long as it is not also the key column–can change at any time without consequence.

The key column can be computed by an Initial value expression when the row is initially added, but it cannot be recomputed later if the row is updated, so you cannot use Reset on edit? with the key column.

To create a regular (non-virtual) column that can be computed but cannot be edited by the user, try either of the following:

  • If the (non-key) column value need only be computed when the row is first added or if the column value needs to be changed by actions but not by the user, set the column’s Editable? property to the expression, FALSE.

  • If the (non-key) column need be recomputed, use the column’s App formula expression. If the column is a virtual column, the column’s value will be recomputed each time the app syncs; if the column is a regular column, the value will be recomputed each time the row is updated, either in a form or by an action.

In general, it is a bad idea to use personal and business names in key values, as people and business do change their names from time to time. Were a name change to happen, you’d be unable to change the name in the app without a great deal of effort. I’d instead recommend using UNQUEID() to generate each user’s key column value, and rely on a Valid If expression to catch duplicate users.