How to over-ride the data which is present my report with some other values?

Dear Helical Team,
I am using Helical Insight 3.1 version. I have created a report but whatever the data is coming, in certain cases, we want to over-ride that data and display some other values.

How can we achieve something like that?

Thank You
Marc

1 Like

Hello Marc,

Using the JS editor it is possible to do that. Below we are creating a report which shows employeename wise cost of travel.

Now let us say you want to change the value for “Ahmed Haider”. Then you can use the code like below over there in the JS portion of Editor.

hi_container.set("postFetch",function(c){
var responseData = c.get("responseData");
var getCost;

for(var i=0;i<responseData.data.length;i++) {
if(responseData.data[i].EMPLOYEE_DETAILS_EMPLOYEE_NAME == 'Ahmed Haider') {
getCost = responseData.data[i].sum_TRAVEL_COST;
responseData.data[i].sum_TRAVEL_COST = 100000;
}
}
c.set("responseData",responseData);
});

The above code is for your reference, you can change the column name for which the value you want to change and then in the other line what should be the value.

After applying the above code the value has got changed to 10000 as mentioned in the code.

Thank You
From Team Helical