I am wondering how to create new rows into the other table using data from multi tables.
What I mean is that I have one child table with two tables as parents.
I want to create new Rows from this child table in a third table.
In the new Rows, I also want to include information taken from the parent tables.
Is there a good way to do this?
Solved! Go to Solution.
Parent 1 Table Structure
Parent1ID | Field | AnotherField | YetAnotherField | etc... |
UniqueID() | ||||
UniqueID() |
Parent 2 Table Structure
Parent2D | Field | AnotherField | YetAnotherField | etc |
UniqueID() | ||||
UniqueID() |
Child Structure
ChildID | Parent1IDLink | Parent2IDLink | Childfield | ChildField2 | etc |
UniqueID() | Parent1Ref | Parent2Ref | |||
UniqueID() |
Combination Table Structure
CombiID | ChildField | AnotherField | YetAnotherField | Parent1Data | Parent1Data2 | Parent2Data | Parent2Data2 | etc |
UniqueID() | ||||||||
UniqueID() |
Create a Behaviour on Child Structure Table
Fields to Modify
[Parent1Ref].[YetAnotherField] is a Dereference Expression...Check it out HERE
Parent 1 Table Structure
Parent1ID | Field | AnotherField | YetAnotherField | etc... |
UniqueID() | ||||
UniqueID() |
Parent 2 Table Structure
Parent2D | Field | AnotherField | YetAnotherField | etc |
UniqueID() | ||||
UniqueID() |
Child Structure
ChildID | Parent1IDLink | Parent2IDLink | Childfield | ChildField2 | etc |
UniqueID() | Parent1Ref | Parent2Ref | |||
UniqueID() |
Combination Table Structure
CombiID | ChildField | AnotherField | YetAnotherField | Parent1Data | Parent1Data2 | Parent2Data | Parent2Data2 | etc |
UniqueID() | ||||||||
UniqueID() |
Create a Behaviour on Child Structure Table
Fields to Modify
[Parent1Ref].[YetAnotherField] is a Dereference Expression...Check it out HERE
Thank you very much for detailed guidance!ใLet me ask one more question.
How should I set the data TYPE for the table "Combination Table Structure"?
I guess the colums other than "CombiID" shoulde be Ref TYPE ?
Am I right??
Is
Hi!,
No...the columns for your combi table do not have to be Refs as they are being set with the ACTUAL data that is being pulled in from the Dereferenced expression. If you set them as Refs to your Parent1 and Parent2 tables then you will not need to use a Dereferenced expression within your Action.
What the Action I gave you currently does is to LOOKUP the values in Parent1/Parent2 and write those values directly into your Combi table. This will be whatever those values were AT THE TIME that the Action was triggered. If subsequently you changed those values in your Parent1/Parent2 table, your Combi table values WILL NOT CHANGE.
If you wish those Combi values to update as the Parent1/Parent2 records change, then you should just develop your Combi table in the same way that you made your Child table.
If you did not really get a handle on the Dereferencing Expressions I linked to and felt they were not for you then I would urge you to reconsider. They are FUNDAMENTAL to how each of your data tables can talk to each other.
The app like this.
And I would like to go to Parent table form the Combination View?
User | Count |
---|---|
41 | |
25 | |
25 | |
17 | |
12 |