customizeCell with result from HTTP call is not working

Answered
Xavier Jordi asked on July 3, 2019

Hi,
I'm trying to use a customizeCell function to replace the cell value with the result of an HTTP call to a REST API. In order to do that, I need to make the customizeCell function asynchronous and use the await keyword to wait for the HTTP result.
Even though the execution is happening in the right order, the cell text is not modified.
I attach 4 screenshots:

  • customizeCell function code with the call to the REST API 
  • result of the above code 
  • customizeCell function without the call to the REST API 
  • result of the above code 

Is this functionality supported?
Thanks and regards,
Xavier

Attachments:
Screenshots.PNG

2 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster July 3, 2019

Hello Xavier,
Thank you for writing to us.
 
The asynchronous approach is not available for customizeCell. Please note, that customizeCell is called on each redraw, scroll and other operations that change the pivot view. Thus, that method should be synchronous so not to reduce the performance.
For your case, we recommend preparing all the necessary data before running customizeCell.
 
Please let us know in case of any other question.
Regards,
Dmytro

Public
Xavier Jordi July 4, 2019

Thanks for the quick reply!

Please login or Register to Submit Answer