I have 2 tables, lets call them Company and employees, i can add notes to both views that are linked to the Company ID or Employees ID, each of these tables have a column called Status, when i create a new note i would like it to fill that status in to the note table but as i have 2 parent i cant just use the normal ref, is there a way to say, take Status from PARENT and put it here?
There’s a section about
Many-to-Many relationships towards the bottom of this support document that should help.
Im sorry, i dont see where i can see the solution to my problem, i am being explained about how databases work but not how i, in appsheet, draw from a parent a field to a specific field in the child
I’m not exactly sure what you’re trying to do.
- Do you want to DISPLAY the
- Create a separate Status in the
Child-Recordwith the same initial value as the parent’s current value?
For #1, create a Virtual Column in the Child table, with formula:
For #2, use the same formula in the Initial_Value setting of a regular sheet column.
I want to copy the parent.status to the child.status, this would not be a problem if parent always was the same, but because i only wanted one table containing notes, i have ref to notes from 2 tables
So it is something like #2 but i have 2 parents…
Do you have two different Ref columns in the same table? Can you post screenshots of both table’s column settings?
You don’t have a Ref-type column in your Notes table. I think you’re going about creating relationships the wrong way.
Did you add the
Related Notes-Ref_Row manually? The normal approach is to add a sheet column in the child table of type=Ref, and store a key for a parent record.
Adding a Ref-column in the child table automatically creates the Ref_Rows for you in the parent. It looks like you’re trying to build it manually, but there is no Ref-column in the child (Notes) table.
Also, you may not need two parent tables, but rather, two slices of the same table. Perhaps it would help if you explained the use-case and data involved. I’m still not sure what your end goal is.
the two parent tables contain completely different data.
it is a bit hard for me to explain because it is very specific to my work but lets say:
table 1: lets call it “Car”
Table 2: Costumers
Table 3: Notes
So when i create a note on a car, it will store in the Notes table with the Car_ID as source_ID and when i create a note on a costumer, it will store in the Notes table with the costumer_ID as source_ID
Now i would like it to automatically fill in the Status field so i can see what the status was when i made this note…
Does that give any sense?
And thank you alot for your patience and your help
Just add a second Ref-type column to the child table and make each Ref point to a different table.
Notes[Source ID] to
[Car_ID], and add a column for
When creating the child from the new button shown on the parent’s Related-Records inline view, it will autofill the parent Ref for you.
You will probably want to use the Required_If to make one of the two Ref’s required, and lock them from editing when not blank.
[EDIT] For this use case, I think it would be best to hide the Ref not being used. So each new note will always be created with one of the two Ref’s filled in, and the other hidden so it doesn’t confuse the user.
Use the Show_If formula to reference the other Ref using
Thank you for your input, i will try to make it work tomorrow, it is late (11pm) and i am trying to remove action buttons from specific views :-/
i am only a newbee to this…
For those trying to create a many-to-many relationship: just dropping in a link to a summary post I made, which contains a sample app, about how to accomplish this.