Editing a Multi Relation

Here’s puzzle I cannot seem to solve:

  • There are tables Tasks and Clients.
  • Each task can serve several Clients (1:n).
  • In Tasks I set up three columns: clients (the names of the clients as foreign keys; if multiple then comma separated), clients_arr (the names of the clients as an array), clients_rel (the multi relation to the table Clients linked to clients_arr.

This setup is working nicely when adding a new task:

Bildschirmfoto 2023-07-16 um 17.07.33
(translate “Bewohner” with “client”)

But when I edit a task it’s looking differently:

Bildschirmfoto 2023-07-16 um 17.07.55

I only see the selected clients. That’s ok, as long as I don’t want to change them. The settings for the Choice component are like this:

(translate “Bewohner_rel” to “clients_rel”)

Since the component is bound to the multi relation column only the selected clients are shown. Great.

Or not. Because how to select an additional client? I can remove a client by clicking on it, but i cannot add another one. When adding the Task I see all clients from the table and can select the relevant one. But when editing I cannot bin the component to the table. Then all clients are shown - but the ones selected are not highlighted like when adding a Task.

What am I doing wrong? Where is my understanding lacking? I’d like the edit screen look like the screen for adding a Task (first image).

Any ideas?

Use your Clients table as the source of the choice component, instead of the relation.

1 Like

Thanks! Yes, that works. :partying_face:

But strange, nevertheless, because that’s what I tried first - and it did not work. :roll_eyes: I’m very sure. Hm…

Anyway. I’m happy it’s working now. Sorry for bothering you.

1 Like

Is it possible that you may have had it targeted at the wrong column? (that would explain the behaviour that you saw)

No bother at all. Happy to help :slight_smile:

Maybe. Don’t remember. But now I know that it’s working as expected - when done right :wink:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.