Forum Discussion

BobNelson's avatar
BobNelson
New Contributor III
3 months ago
Solved

IsDurableCalculatedData

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

  • 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

     

  • 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

     

    • BobNelson's avatar
      BobNelson
      New Contributor III

      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

  • 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.

    • BobNelson's avatar
      BobNelson
      New Contributor III

      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.