Is there a way to auto-increment a number field so that the numbers only happen within the subtable record of a parent record?
OK, that's probably not clear, so let me use an example of what I want to do (this is not my use case which may be to obscure, but it illustrates the point:)
Say you have a main table called Contacts and a sub-table of that called "interactions". For any particular contact, I want to be able to auto-increment the number of interactions. When I use the code suggested in the Ninox manual (for Invoices) it auto increments for all 'interactions' en masse. Meaning if contact 1 has 3 interactions then I add an interaction for contact 2, it automatically increments that to 4. I want the numbers to be specific to each contact. Clearly the code needs to reference both the parent and sub-tables, but I don't know how to do that.
Does this make sense? Any thoughts
2 replies
-
Here's an example database :
https://www.dropbox.com/s/837uekjlwshx09b/AutoNum%C3%A9ration.ninox?dl=0
Steven
-
You're awesome, Steven. Thanks for doing this!
Content aside
- 3 yrs agoLast active
- 2Replies
- 476Views