Announcement

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

    field of type summary has an underscore prefix in the record

    SmartClient Version: v12.1p_2022-02-03/AllModules Development Only (built 2022-02-03)

    Chrome on MacOS

    Hello, I just noticed that a field of type "summary" in a grid, is mapped in the record object with the name of the field prefixed with an underscore.

    This was not the case with older versions of SmartClient (well, I tested only a very old version for now)

    Is it an intended change?


    Code:
    isc.ListGrid.create({
        ID: "countryList",
        width:500, height:224, alternateRecordStyles:true,
        data: countryData,
        fields:[
            {name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
            {name:"countryName", title:"Country"},
            {name:"capital", title:"Capital", showIf:"false"},
            {name:"aSummary", type:"summary",
             getRecordSummary: function (record, field, grid) {
               return '_' + record.countryCode;
            }
    }
        ],
        canReorderFields: true
    })
    
    
    isc.IButton.create({
        left:0, top:240,
        title:"show 1st record",
        click:"isc.say(countryList.getRecord(0))"
    })

    #2
    This is intended, because it’s an internal calculated value that wasn’t meant to be accessed, and writing it there was clobbering a user’s own data.

    Comment


      #3
      thanks for the confirmation, I've updated my code where I was accessing the summary field value.

      Comment

      Working...
      X