I want the value of the column ID paciente in the main table to be filled in with the value of the column ID paciente from the “paciente” table.
You can read a specific record with the LOOKUP() expression. Read more about from here.. https://support.google.com/appsheet/answer/10107410?hl=en&sjid=11319718157966719083-EU
Set column ID as Label and type: Ref ?
already tried that. It did not work. Thanks though.
I understand that you need the [ID patient] to be written to a column in the main table.
That magic will happen when, in the main table, your [ID patient] column is configured as a Ref type. The Ref type has the particularity of calling the ID of the table it references. For example, if you want a reference from the “patients” table, you configure the Ref field as a Ref to the “patients” table. This will call the ID, and the ID will be written in the main table. Then, thanks to the ID, you can request any data from the “patients” table using what is known as Dereference.
Thank you very much for your answer. The column is already ref type but what happens is that the ID_paciente appears as a dropdown with all the ID_paciente options to pick up one. What I need is the ID_paciente to copied automatically from the table “PACIENTE” to the main table.
Patience table: id_patience need to know what to pick up… how you determin what to automatically select?
In example below from table “Site” look for “Name” and display column “Job Number” of found row
LOOKUP([Site_Handover], “Site”, “Name”, “Job Number”)
Look in here
In this case, you could do it either manually or automatically. The automatic option is through a BOT that executes an action when something occurs (for example, the addition of a field in the patient table).
The manual option will execute the action if you press a specific button.
In any case, there is an action within AppSheet actions that adds a row to another table using values from this table.
-
Create a new action.
-
Choose action type: “Add a new row to another table, using values from this table.”
-
Select the source table and the destination table.
-
Choose the columns you want to copy, in this case, it will be ID_paciente (also remember it will request any required fields). Please verify that in the Main table, Patient ID is Ref and in the Patient table, the ID is text. Add that value in the action column.
-
Set up the button so you can choose where to press it from or assign it to the bot.
If that’s not what you need, it would be very helpful if you could send a screenshot or a slightly clearer explanation.
Regards.
Note: I noticed that you wrote “paciente” and you probably speak Spanish. If you want to say it in Spanish, that’s also valid.
“Let me clarify further. The user begins by filling out a form called ‘paciente,’ which is saved in the ‘paciente’ table. Then, the user can complete another form called ‘evoluciones,’ which is also associated with the same patient. Multiple ‘evoluciones’ forms can be completed for each patient. The app should automatically take the IDpaciente from the view the user is in when loading the ‘evoluciones’ form, ensuring that each evolution is correctly linked to the patient.”
Thank you very much!! And yes, I am from Argentine but I do not have any issues writing in English. Your very kind to offer me to write in Spanish! Thank you. I will try your proposal and let you know.
Buenísimo amigo! yo tambien de argentina!
Vamos!! argentina!!