Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    dataSource.exportClientData ignores field title

    SmartClient Version: SNAPSHOT_v11.1d_2017-05-03/AllModules Development Only (built 2017-05-03)

    Chrome on OSX

    Hello, using the #localDataSource showcase sample, please execute this code in the developer console:

    Code:
    countryDS.exportClientData(countryDS.testData, {exportAs:"xls", exportFilename: "test", exportFields:["countryCode"]})
    You'll see that in the exported file the column name instead of the title is used.

    #2
    Just to let you know, we do replicate this issue and it is assigned to a developer. We will post back here when it is resolved.

    Comment


      #3
      A fix for this issue has now been commited to 6.1 / 11.1. It will be present in tomorrow's builds, dated May 19th.

      Comment


        #4
        SmartClient Version: SNAPSHOT_v11.1d_2017-05-19/AllModules Development Only (built 2017-05-19)

        I confirm it's fixed, thank you very much.

        Comment


          #5
          SmartClient Version: SNAPSHOT_v11.1d_2017-05-24/AllModules Development Only (built 2017-05-24)

          Chrome on OSX

          Hello, I've just noticed that it works only if I explicitly specify the exportFields parameter.
          If I omit it:
          Code:
          countryDS.exportClientData(countryDS.testData, {exportAs:"xls", exportFilename: "test"})
          it raises a js error:

          Code:
          14:22:22.184:TMR0:WARN:Log:TypeError: Cannot read property 'length' of undefined
          Stack from error.stack:
              [c]DataSource.exportClientData(<no args: exited>) on [Class DataSource] @ ISC_DataBinding.js:871:85
              DataSource.exportClientData(<no args: exited>) on [DataSource ID:countryDS] @ ISC_DataBinding.js:523:23
              eval(<no args: exited>) @ [no file]:1:11
              _3.eval(<no args: exited>) on [Class Log] @ [no file]:3:8
              [c]Class.evalWithVars(<no args: exited>) on [Class Class] @ ISC_Core.js:295:62
              [c]Log.evaluate(_1=>"countryDS.exportClientData(countryDS.tes..."[88], _2=>Obj) on [Class Log] @ ISC_Core.js:1173:667
              LogViewer.evaluate(_1=>"countryDS.exportClientData(countryDS.tes..."[88], _2=>Obj) on [LogViewer ID:undefined] @ ISC_Core.js:1205:350
              DebugTarget.evalJSWithDevConsoleVars(_1=>"countryDS.exportClientData(countryDS.tes..."[88], _2=>Obj, _3=>null) on [DebugTarget ID:undefined] @ ISC_Core.js:2270:1563
              _3.call(_1=>Obj, _2=>undef, _3=>undef) on [DebugTarget ID:undefined] @ ISC_Core.js:2250:17
              _3.handlePacket(_1=>Obj, _2=>[MessagingDMISocket ID:isc_MessagingDMISocket_3], _3=>[object Window]) on [DebugTarget ID:undefined] @ ISC_Core.js:2240:208
              _3.packetReceived(_6=>Obj, _7=>[MessagingDMISocket ID:isc_MessagingDMISocket_3], _8=>[object Window]) on [MessagingDMISocket ID:isc_MessagingDMISocket_0] @ ISC_Core.js:2242:164
              _3.receive(_1=>Obj, _2=>[MessagingDMISocket ID:isc_MessagingDMISocket_3], _3=>[object Window]) on [MessagingDMISocket ID:isc_MessagingDMISocket_0] @ ISC_Core.js:2230:80
              [c]Class.fireCallback(_1=>Obj, _2=>null, _3=>null, _4=>null, _5=>true) on [Class Timer] @ ISC_Core.js:284:104
              Timer._fireTimeout(_1=>"$ir133", _2=>151, _3=>undef) on [Class Timer] @ ISC_Core.js:1729:166
              <anonymous>() @ ISC_Core.js:1726:40

          Comment


            #6
            This is now fixed - please try it with tomorrow's 11.1 build (dated May 31)

            Comment


              #7
              SmartClient Version: SNAPSHOT_v11.1d_2017-06-05/Enterprise Development Only (built 2017-06-05)

              I can confirm it's fixed, thank you very much.

              Only a question: I see that all columns present in the countryData array are exported, even if only countryCode, countryName and capital are defined in the dataSource. Is it expected?

              Comment


                #8
                Yes, this is the case for exportClientData(), but not for the server-oriented exportData().

                Comment

                Working...
                X