DA JS getFieldAsString

Hi,

I think that is incorrect:

DataAbstract.js (line488) 6.0.58.1001 - beta:
return (this.fields[fieldNum].type == “datBlob” ? “(Blob)” : (this.rows[this.fIndex].newValues[fieldNum] ? this.rows[this.fIndex].newValues[fieldNum] : “”).toString());

If my value is 0, this is returning “” (empty), because:

0 ? 0 : “”;
""
correct return 0 (if I have a integer 0 in my datatable);

before 6.0.58.1001 (2011 winter release I think):

return (this.fields[fieldNum].type == “datBlob” ? “(Blob)” : this.rows[this.fIndex].newValues[fieldNum].toString());

  • correct I suppose .

tested in chorme browser;

Thanks,
Willian.

comments ? I am right or wrong ? :slight_smile:

Oops, it didn’t post my comment for some reason… Reposting.

Hello, Willian, thanks for the report.
Previous version would fail on undefined, that’s why additional check was added, but current needs to be improved as well. Logging, will be fixed in the upcoming release.

Hi Valeriy

No problems, I switched to getFieldValue, for now…

Thanks
Willian.