How do I add a new record that is related to 2 other fields?
I want to add a new record that is related to two other fields:
My tables are:
Table1: People
Table2: Projects
Table3: Groups (relates person and projects)
Table4: Payments (by group)
I want to add a new payment in which I know the person and project related to this payment. So I need to check if the group is repeated or I need to create a new one. How can I do that automatically?
Thank you!
4 replies
-
I am slightly confused by the data model. So, a Person makes a payment towards a project? If so..If yes.. then what is "Groups" purpose?
-
Edit: I wanted to use a numeric column as key for each table (not the built-in ID from NINOX)
I know that if I use the built in ID it gives me the right Group ID, but if I use my own numbers, nothing shows.
Is there any formula that I should use for this? -
Sorry.. I am still struggling.. So if Bob makes 3 payments to project 1.. and 2 payments to project 2... You would like to see two different "payment groups"?
What does your data model look like..
A.
or
B.
I assume A.. as you said when posting a payment you know the person and the project.
Now.. for "IDs"... It is good practice to create your own unique key.. There are several threads that offer various suggestions from sequential ordering.. to random number generation ... But first.. I want to better understand the data model.. :)
-
Sorry.. I am still struggling.. So if Bob makes 3 payments to project 1.. and 2 payments to project 2... You would like to see two different "payment groups"?
What does your data model look like..
A.
or
B.
I assume A.. as you said when posting a payment you know the person and the project.
Now.. for "IDs"... It is good practice to create your own unique key.. There are several threads that offer various suggestions from sequential ordering.. to random number generation ... But first.. I want to better understand the data model.. :)
Content aside
- 5 yrs agoLast active
- 4Replies
- 1575Views