Two linked issues here.
- There is a facility to create the next number in a sequence by double-clicking on a numeric field. The first issue is that I can no longer find where that is documented.
- Second issue: this functionality no longer appears to work in version 0.9.98a. If I double-click in an empty field, a new number is assigned. However, when I navigate away from that field, the newly created value simply vanishes. If I double-click on a number previously created in an earlier version of InfoQube, or indeed if I just navigate to the field using arrow keys, the number is initially displayed but as I navigate out of the field it vanishes; the field becomes blank.
Any thoughts or suggestions?
Comments
The specific problem that I am reporting relates to a number field for which the auto option has been selected. The behaviour up until recently has been that, when I double-click on a blank value for this field, the next available sequence number is displayed in the field and when I navigate away from that value, it is preserved. In the specific instance which I am reporting, as I double-click on the value, a new value is assigned, but as soon as I navigate away from the field, the value is blanked out. Furthermore, if I navigate using arrow keys to existing assigned numeric values, as I reach each value, it vanishes.
What I decided to do was to create a completely new number field, again with auto set, and to create a completely new set of numeric values using Edit / Renumber values.This new set of values is behaving as I would expect it to. As an example, the field EntryNr runs 1..2186. Another field, EntryID, is calculated on the basis of a call to a VB function as part of a row equation which reads:
For your and general interest, the application here is to create a completely unique identifier for journal (diary) entries which have a date component but where there may be several journal entries on a given date. I cannot use IDItem as the basis for this unique key, because IDItem is not assigned until after the current row is committed to the database.
So, although I think there is a problem associated with auto-numbering, I have myself found a satisfactory workaround. There must be something unusual about the values in this particular field. The values are not a dense set, that is to say, the numbers are not consecutive. That is because I set up the original values on the basis of a start value of 10 with a step of 10 and not of one. This will not be a common use case!
' amended 02/09/2015 so that the generated entry ID starts with a date in YYYY/MM/DD format, therefore creating a proper sort key
Dim EntryNrAsText, yyyy, mm, dd, ignore
If IsNumeric(EntryNr) then
EntryNrAsText = Right(CStr(1000000+EntryNr), 6)
Else
setEntryID = "EntryNr not numeric"
End If
setEntryID = cdate(EntryDate)
If Len(setEntryID) = 10 Then
dd = Left(setEntryID, 2)
If IsNumeric(dd) Then
If Mid(setEntryID, 3, 1) = "/" Then
mm = Mid(setEntryID, 4, 2)
If isnumeric(mm) Then
If Mid(setEntryID, 6, 1) = "/" Then
yyyy = Mid(setEntryID, 7, 4)
If IsNumeric(yyyy) Then
setEntryID = yyyy & "/" & mm & "/" & dd & "__" & EntryNrAsText
Else
setEntryID = "EntryDate: yyyy not numeric!"
End If
Else
setEntryID = "EntryDate: / expected but not found!"
End If
else
setEntryID = "EntryDate: mm not numeric!"
End if
End If
Else
setEntryID = "EntryDate: dd not numeric!"
End If
Else
setEntryID = "EntryDate: length expected ten characters; length found " & Len(setEntryID)
End if
End Function