• JSONWriter does not handle views with multiple entries in same column

    By Johan Kanngard 1 decade ago

    To recreate this error, follow these steps.

    • Create a view with the name "test" and one column.
    • Create an empty form
    • The column should contain the formula Form : (Form + "a")
    • Run the agent:

      Set view = currentDb.getView("test")

      Set writer = New JSONWriter()

      json = writer.toJSON(view)

      An error 13, Type mismatch, is returned. The problem is that the entry.columnValues can not be assigned to a Variant. Why? Ask IBM :-) The patch for a complete export of ls.snapps.JSONWriter to get this working looks like this:

      868d867

      < Dim vColumnValues As Variant

      909,910c908

      < vColumnValues = p_entry.ColumnValues

      < iCount = Ubound(vColumnValues)



      > iCount = Ubound(p_entry.ColumnValues)

      913c911

      < sReturn = sReturn & Me.AppendValue(vColumnValues(x))



      > sReturn = sReturn & Me.AppendValue(p_entry.ColumnValues(x))
    • Fixed in 1.0.4

      By Troy Reimer 1 decade ago

      Thanks for the input.