Submitted by gregory on 2017/07/11 08:52
Two linked issues here.
 
  1. 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.
  2. 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

Hi Mark,
  1. Perhaps -- link to nonexistent node ID 1069 --
  2. I was not able to reproduce it. Can you provide more information ?
 
Pierre_Admin
IQ Designer
 

gregory

2017/07/12 10:35

In reply to by Pierre_Admin

Hi Pierre.
 
The documentation is generally helpful, but still doesn't clarify what you have to do to enter a numeric value. My experience is that if you have auto set, then double-clicking in the number field will cause the next available number to be assigned to that field. So far as I can tell, that behaviour is not documented. I am loath to change the documentation myself until I have a little bit more clarity concerning what InfoQube should be doing at this point.

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:
 
=iif(isnull([EntryDate]),EntryID,setEntryID([EntryDate],10*[EntryNr]))
 
For EntryNr 2186, where EntryDate is 11/03/2016 Friday, the value of EntryID is then 2016/03/11__021860.

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!
 
APPENDIX: Here's the code of the function:
 
Function setEntryID (EntryDate, EntryNr)
' 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"
  exit function
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
 
 
Mark GREGORY, Hull, England- GMT +0/+1; EST +5

2. I was able to reproduce it in the Properties Pane, but not in the grid. Is that your case too ?
 
Pierre_Admin
IQ Designer
 

Pierre_Admin

2017/07/12 17:37

In reply to by Pierre_Admin

This is fixed in v98c
I've also updated the documentation
(though that page does need quite a bit of work to bring it in line with the rest of the doc...)
 
Pierre_Admin
IQ Designer
 

gregory

2017/07/13 07:25

In reply to by Pierre_Admin

Hi Pierre.
 
Sorry, but version 0.9.98c makes matters worse if anything.
 
I had got round the problem - I thought - by creating a new number field. However, this no longer works in 0.9.98c. Clicking on the number field causes it to be cleared / blanked.
 
Mark GREGORY, Hull, England- GMT +0/+1; EST +5

Pierre_Admin

2017/07/13 07:40

In reply to by gregory

Please try to reproduce the issue on a sample database and send it over
 
Pierre_Admin
IQ Designer
 

fixed in v99
 
Pierre_Admin
IQ Designer