Formula ID count also deleted records
Good morning everyone,
I have a formula field with ID in it. This shows me the record number. My problem is that I have noticed that this formula also counts me the record ID's that have been deleted. How can I change the formula so that it coincide always with the progressive number of the record?
7 replies
-
Can you post the code from your formula field and gives us the names of important fields and tables?
-
Thanks. I mis-read you post.
The row numbers, the far left numbers, are for display purposes only. If you sort your table by another field the row numbers don't change but the record next to it does.
The record Id for you table is a unique number that Ninox keeps track of internally and just keeps adding one for each new record. You can not affect this number in any way.
It is not recommended to try to match the display row number with the unique identifying code. Lets say you have 100 records. Then you delete 5 records randomly throughout the table (records 4,22,23,50,99).
What number should the 101 record be?
Do you want to renumber all of the other records? This could only happen on a field that you create as the Ninox record Id can not be change by you.
-
Fred said:
Thanks. I mis-read you post.
The row numbers, the far left numbers, are for display purposes only. If you sort your table by another field the row numbers don't change but the record next to it does.
The record Id for you table is a unique number that Ninox keeps track of internally and just keeps adding one for each new record. You can not affect this number in any way.
It is not recommended to try to match the display row number with the unique identifying code. Lets say you have 100 records. Then you delete 5 records randomly throughout the table (records 4,22,23,50,99).
What number should the 101 record be?
Do you want to renumber all of the other records? This could only happen on a field that you create as the Ninox record Id can not be change by you.Thank you Fred for the answer. Actually I don't want to alter the record id assigned by Ninox but I would simply like to replicate the number that Ninox assigns to that record through a formula. My problem is that by inserting the ID formula in a formula field, it also counts the deleted records, while the recordID that Ninox provides does not count them.
So what I would like is to have a formula that reads me the Ninox ID without counting the deleted ones.The second, perhaps easier option would be to make a numeric field that starts with 1 in the first record and for each subsequent record adds +1, but I don't know how to write it
-
if you decide to go with a autonumbering number field then
Put this in trigger on new record on the form
let before := max((select JobDockets).'JobNumber');
'JobNumber' := before + 1change JobDockets to be the name of your table
JobNumber needs to be the name of your number field
-
Walcher Messebau said:
My problem is that by inserting the ID formula in a formula field, it also counts the deleted records, while the recordID that Ninox provides does not count them.I was taught that Id (lower case "d") is the proper way to reference the record id. So I'm not sure if there is a typo when you are typing ID. Ninox does not recognize recordID in a formula field so I'm not sure what you are referencing here.
-
I've fixed the problem with this:
Thanks to all
Content aside
- Status Answered
- 1 yr agoLast active
- 7Replies
- 139Views
-
3
Following