How to I create a Many to Many Connection with a form record rule?


An “Inventions” table contains 3 One to Many connection fields:

  • Inventor #1 (One to Many connection to a User)
  • Inventor #2 (One to Many connection to a User)
  • Inventor #3 (One to Many connection to a User)

I would like to automatically create a Many to Many connection field in the Inventions table:

  • Inventors (Many to Many connection to Users) = { Inventor #1, Inventor #2, Inventor #3 }

The reason for this is the User Interface for entering inventors is cleaner when using a One to Many connection (hence using multiple fields). It also allows to preserve the order in which the inventors should be connected (the Many to Many connection field doesn’t preserve the ordering).

However, having separate connection fields (Inventor #1, Inventor #2, Inventor #3) doesn’t allow to calculate the number of inventions per inventor (with a Card component) and doesn’t allow to check easily (in one test) if the connected user is connected to the invention.

Hence the need for BOTH the One to Many connection fields, and the auto-calculated Many to Many connection field.

The idea is to have the user enter the One to Many connections. Then upon submission, use a record rule to automatically create a Many to Many Connection.

Is there some Tadabase guru who knows how to use the Pipe “Tadabase Rest API (Updated)” to do that? (I guess it would be the “Saving One to Many Connection Field”)

@GREDDIE @tim.young @moe ?

Did you try using a search component in the page builder? You could then filter per inventor, or even insert a pie chart per inventor.

The search component would work… for a search.

But the purpose is different.

(1) show a count of inventions for the logged in user
This would be in a dashboard using the “Card” component (which where there is a need for a Many to Many field)

(2) filter inventions of the logged in user, not other users
This would be possible without the Many to Many field, as I currently do

The problem with the “Card” component is the filter doesn’t give the option to “Match Any”

This is why I need this workaround to create a Many to Many field with a form rule.

Mmm, I think you didn’t try the Search component yet. You can set to filter by all or any inventor or even if all the elements of the page are aiming at the same table, you can set that every time you use a filter all the elements of the page (cards, tables, etc.) apply that filter.

The search component is a front end component.

What I am looking for is a backend solution. Something that happens after the user “clicks” a button and that records the changes in the table, as a result of the backend action.

The search component will not update any table. Its role is only to provide a filtered view.