Cannot create a record in . The record already exists.

I have created a custom table, it contains 2 fields: A custom code (DS72), which uses a number sequence I have setup and ItemId. I have joined this table as a datasource to the InventTable form and am displaying the value held in this for any associated Item’s in the grid view. The problem is, when I edit an item which doesn’t have a DS72 code attached, I get the following error:

Cannot create a record in BTN_DS72 (BTN_DS72). DS72: .

The record already exists.

When I go to the DS72 form, it seem’s to have created or tried to create a new entry for some reason? I don’t know why it does this?

But the record it says already exist doesn’t exist isn’t it?

I’ve seen simmilar messages with other tables also, what we have done is a cleanning process in the number sequence that is generating the error, and restarting the AOS becouse it seems that the sequence remains in memory or something like that (I’m not very technical). Then try to create the record again, you wount have the message and the record will be created ok.

Good luck

Restart AOS and also check in ‘Number Sequences’ (Basic Module) - I have seem number sequence mixup and you need to clean out the respective number sequence as they get ‘clogged up’.

But it’s a new number sequence. I’ve restarted the AOS and the problem still persists. It’s whenever I try to make a change to an item in the InventTable which doesn’t have a DS72 code attached, for some reason it creates a new empty row in my DS72 table and it won’t let me save any item in the InventTable until I delete that row. However, if I make a change to an item which DOES have a DS72 code attached to it, it saves fine…

I’m just not sure why it tries to create a new DS72 number whenever I try to save an item which doesn’t have one attached.

On number sequences is there some mandatory setting that is always creating a new record?

There is no mandatory option in Number Sequences? Unless you mean the field in my table? In which case I have set it to no