Ability to disable 'link' for relationships

I have a situation that shouldn’t be too uncommon.

User A links entities X and Y. Entity Y’s fields are effectively an extension of X and wholly reliant on X for formulas. Once Y has been assigned to X, it should never be removed unless either entity is deleted.

User B comes along and links Y to Z. This not only removes Y from X in this many-to-one relationship, but it breaks the data in a way that’s hard to catch.

I need a way of locking down this field so that users can only create and link, not link existing entities or reassign.

1 Like

Hey! I feel you. I wish you could specify the behaviour per relation view (compact view as well as the larger relation views)

For the time being, I’m assuming this is a to-many relation, this behavior (in the larger relation views) is only for the list view. So what i find myself doing a lot in these scenarios is to make a board view and set the size to “line” this basically makes it a list view, without the ablility to link, or even unlink! only create and delete.

While annoying you can’t set this per view, you are given the ability to choose this behaviour based on which view you choose.

More about linking and unlinking? Choose list, more about creating or deleting? Choose any of the others.

Related: "Link or Create" in Board and Table

Not a real solution, but you could create a Rule that triggers on the unlink, and generates some sort of warning/notification (though not as a toast/pop-up when the change actually is made).

A workaround: I sometimes use (and should use more often) a formula column. Say I’m linking something to a project. In the create Form, I’ll use the relation field, Project Link to choose the project. Then, in views, etc. I’ll use the formula field Project (formula being [Project Link]) which shows the project relation as a read-only field.

Obviously, this means doubling up on fields, which isn’t ideal, but works. It does assume that team members aren’t going to make their own views and add Project Link instead of Project though.

I do the same for State fields if they’re updating based on other things, or only via button, etc.

This kind of works… but it causes the list to lose ordering, which isn’t user-friendly if creating a chronological or alphabetical list

You can set the sort in the view toolbar. Not sure which sort you want, they are both default to sort by rank (drag and drop) if I’m not mistaken.

Seems like a use case for this, no?
Y should only exist so long as X exists, right?

you can’t set the sort (or the order of displayed fields) in an “entity link” generated by a formula, because there is no toolbar (and the filter is not drag-and-drop)

This is one part of it.

I’ll give you a concrete example.

Imagine customers who sign legal documents, or “contracts”. These are uploaded on a new entity, with a description which has a summary of the document, a link to the customer that signed, and a date.

Now say a user goes into another customer and approaches from the “contracts” list view. They click on the link button, then choose an existing contract. Immediately, that contract’s previous link is severed. Now two unrelated entities are joined.

The ability to link or unlink should be limited - either by user/group permissions, globally, entity type, per relationship, or a combination of - to prevent data issues like this occurring.

In this case, I’d prefer if the “contract” could never be disassociated from the customer, and only “new” contracts were allowed. This obviously should be overridable by the system administrator.

Im confused, are you referring to when using board view and setting the size to “list”, or a different solution which was suggested above?

Have you considered using a relation filter so that Contracts linked to an existing Customer are excluded from the list of entities that can be chosen to be linked?

Bronn’s workaround

1 Like

That’s what I’m doing as a workaround, but it means the list is always empty, “No suggested [Entity Name]”, which still may confuse the users.

Whatever. I’m just going to trial it with them. They’ll have to enter from the other entity to create one for now, then.

Why is that a problem?
You want users to not be able to link existing items, so what would you expect the list to show?!

It should still be possible to create new items.