calculated value not appearing in DB view

gabriel_sk
Tera Contributor

Hello team,

I have created a simple Calculated field on the table asmt_metric_result:

(function calculatedFieldValue(current) {

if (current.nps_value !='') {

return current.nps_value * 100;

}

     

})(current);

It works fine when I display the asmt_metric_result table, but does not work as expected in the Database view that contain that table.

I have a DB view that connect the incident table to the asmt_metric_result, but here the field does not show any value. is that normal or I made some mistake?

I thought that this could happen as the name of the field I am calculating has clearly a different "name" in the DB view... smth like   mtrt_nps_value, but even pointing to it does not change the result.

My main goal is to display this calculated field within a report that use the DB view as "table".

Any suggestion is appreciated!

Thanks

5 REPLIES 5

You are my hero 🙂
thanks for the hint with update 

previously the calculated field was added to the DB View and a report but displayed was a link with text '(empty)' under this link was the correct value of the calculated field ( behavior similar to metrics ). 

after updating the corresponding records the calculated field is showing the value on the report as well. 

 

However when I have a 1:n relation and have for eg. a server multiple calculated fields records

the old records do not get updated on report even if the beneath value is ok, it would require an update on all 'old' records every time a new one is added to the report, even if on the table it looks ok.

 

In Kingston there are new function fields available that are not stored to DB but calculated 'on the fly', but they are limited, 

so for some more complex stuff just the metrics will do the job