Get Free Trial

Calculated Field in Mapping Object

Answered
Serban Vasile asked on January 12, 2022

We know about calculated fields that are using aggregation functions, for measures…but what if we have this scenario:

  • we are not in control of the web service that provides json data, so we cannot modify/add fields to it on the server (think something like a public service, not ours);
  • we have two fields arriving in the json stream, date_started, and date_ended;
  • we want to calculate days_diff as the number of days between the two dates, and aggregate min_days_diff, max_days_diff, avg_days_diff;

Is that possible? This sounds like a feature any reporting engine should have and, to be frank with you, as I am pretty sure you are reading each node in the json to modify caption, data type, etc., should be easily implemented as a mapping object feature. I read one of your answers where another field could be referenced as a property inside the mapping config of a field. Can that functionality be expanded with a function that executes for each property mapping?
Thank you in advance,
Serban
PS. I understand customizeCell can alter a field value but that only triggers for visible cells, that lazy load into screen, and would not participate in aggregations. Unless I am missing something, that is not a solution to my question.

1 answer

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster 7 days ago

Hello, Serban,
 
Thank you for contacting us.
 
Currently, our roadmap is already settled, and we don’t have much space for maneuver.
Alternatively, we suggest loading your data to the client side, and this way, it will be possible to prepare it according to your needs.
 
 
Kind regards,
Nadia

Please login or Register to Submit Answer