Hello, I have a table with field : - Date : Date - Index : Integer - Comment : Text With Primary Key : Date+Index This table is for a simple “planning” User add task to this table to be performed in future. User don’t know always the date, and thus, don’t set that User write data via a simple tabular form with autosplikey I have lot of data on table. When I try to add a line at the end of the form whitout date, I have error “Date=’’,Index=149604” exist And … yes that exist But Why??? On my table the last entry with date=’’ is with index 182362 before 149604, I have 142362 and after, it’s 162362 So why autosplitkey try to add index = 149604 and not 192362 (last +10000)??? And how to correct it?
Hi, The autosplit key takes the last integer value from the lines. To remove this problem, the workaround can be applying filters before entering the new record as the navision does for journal forms. After applying the filter on Date, it will pick the last value for that date and increment accordingly.
don’t understand I’m on NF2.6, on journal form (item or gen), on trigger OnNewRecord, ther is a call to setUpNewline. But I dont see any filter on record And the form is always filtered with field like templane name, … But, I tried to do that on this trigger : SETFILTER(Date,’%1’,Date); But, I always have the problem …
The AutospiltKey property works only if the records in the form are ordered by primery key. It does not increment the last number it finds, but it reads the last record and then increments its index. Perhaps you have order in the form different from the primary key. Example: Date Index Comment 01/01/01 20000 A 30/11/01 10000 B When you insert a record in this form you get an error: the record already exists. This is due to the fact that it increments the last value he sees (10.000) in the order you have. I don’t know if it’s your situation…hope this helps you. Bye, Marco
Perhaps you have order in the form different from the primary key. No … My form is order with primary key … BUT when I try to insert a line at the end of the form, I don’t insert in correct order, because I always insert at the end of the form