Here is very simple code to pull Item Description from tcibd001, I am testing the Calculated Properties on table tdsls401.
but I am getting below error message, does anyone test Calculated Properties?
{
"error": {
"code": "ERROR",
"message": "Worker process terminated unexpectedly while executing dll function ottwebodata_hnd::OData.SqlHandler.executeQuery: json_set: null pointer: null"
}
}
function extern long txwai.get.item.desc(
ref domain tcitm.dscr o.item.description)
{
long l.result
domain tcitm.dscr l.item.description
domain tcmcs.s999m l.exception.msg
long l.exception.id
|* initialize output argument and local variables
o.item.description = "TEST"
|* read data from table
select dsca:l.item.description
from tcibd001
where item = :tdsls401.item
as set with 1 rows
selectdo
l.result = 1
o.item.description = l.item.description
selectempty
o.item.description = "Not Found"
endselect
|* check result
|if l.result = 0 then
| |* handle error
| if isspace(l.exception.msg) then
| l.exception.msg = "Get Item Description Failed"
| endif
| dal.set.error.message("@ & l.exception.msg)
|endif
|* cleanup if necessary
|if l.exception.id <> 0 then
| Exception.Delete(l.exception.id)
|endif
return(l.result)
}