Add a row to another table with a form to write in a field

I have two table with 2 fields:
TableA
Field1: ID RATEO (Key)
Field2: STATO

TableB
Field1: ID RATEO (Key the same of table A for REF)
Field2: MOTIVATION

I would that when in TableA a user put the value in STATO = ECCEZIONE,
the user must to insert a mandatory text in the TableB field MOTIVATION,
so creating a record in this TableB with the same ID RATEO and the motivation

Since I do not know how to make record creation on a separate table mandatory based on a field value. In your case, if your requirements allow you to combine the two tables, I would do that for easier control.

If absolutely need to have two tables, then one ‘workaround’ I can think of is as follows.

  1. Create another field (Field 3) on Table 1 , show and make it mandatory when Filed 2 is ‘ECCEZIONE’.

  2. Create an action to add a row to another table that adds a row in Table 2 using the key and the value entered in Field 3. You can set this on the Form saved event.

2-1. You can do the same with a bot.

Hi, Thanks for your reply.

i don’t want create a field on table 1.

There is another solution?

I do not have any other ideas.

Let me ask. Why do you have to have two separate tables?

Cause my system is already structured.
@AleksiAlkio could you help me please?

There is no way to accomplish your goal without either adding another column to TableA or adding a new table. I suggest adding a new table, TableC, that has all needed input fields. Use a form to collect the input in TableC, then use use either a Form saved event action or a bot triggered by adds to TableC to distribute the collected data to the other tables and delete the added TableC row.

2 Likes