Skip to main content
January 2, 2025
Solved

IsDurableCalculatedData

  • January 2, 2025
  • 2 replies
  • 0 views

What is the default state of IsDurableCalculatedData if left out of an api.data.calculate statement?  I'm assuming it's false but I just want to double check.

I'm seeing an api.data.calculate statement which contains an "onEval" statement, then a comma, then False.  If I look at Intellisense, the first field after the "onEval" is userState, followed by the Boolean for IsDurableCalculatedData.  How should I read this statement?  Is the False referring to the userState or to the IsDurableCalculatedData Boolean?

Thanks,

Bob

Best answer by TimVierhout1

Hi,

The default for the IsDurableCalculatedData is false, if you want the data to be durable you have to change it to true.

Can you post the statement to check? But from your comment, it looks like it is the userstate, but this is not a boolean.

With kind regards,

Tim

 

2 replies

January 3, 2025

Hi,

The default for the IsDurableCalculatedData is false, if you want the data to be durable you have to change it to true.

Can you post the statement to check? But from your comment, it looks like it is the userstate, but this is not a boolean.

With kind regards,

Tim

 

BobNelsonAuthor
January 3, 2025

Hi Tim,

Here's the block of code.  I was finding it unusual that at the end I only saw ",False" instead of ",,False".  Either way it's highly unusual to have an api.Data.Calculate in a custom calculation without IsDurableCalculatedData set to true.  As soon as you consolidate, the data will go poof.  Then again, maybe that's what they wanted the data to do.  Will need to drill down further.



Thanks,

Bob

January 3, 2025

It looks like it is the userstate. Do you not get validation errors? If you backspace the comma and put it back, it will tell you which argument you are working on.

BobNelsonAuthor
February 14, 2025

Tim,

It's definitely the userstate that they were setting to false.  There is very rudimentary syntax checking with OS rules.  My guess is that OS saw a userstate of "False" and ignored it.  Either way, it's bad code to put an api.data.calculate into a custom calculation and not set IsDurableCalculatedData to true.