cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

JSON does not allow non-finite numbers for infotable creation

hjimene3
6-Contributor

JSON does not allow non-finite numbers for infotable creation

Hey guys!

 

I'm working on creating a chart bar for a series of boolean tags that identify errors from a process.

In this case, the chart bar shows the total of times an error appears during an specific period of time. What I did for this was creating two services, the first one adds a "1" for each error into a stream everytime its value it's "true" and the second service does the addition of each 1 for every error in the stream to create an infotable that allows me to put these results into the chart. 

However, this testing was made with 5 errors, but the real process has 511 and when trying to test this, I get a "JSON does not allow non-finite numbers" error when executing the service. I really think the service created may be inneficient for the amount of tags there are, so I was wondering what would you suggest for creating the services to allow me to see these 511 errors in the bar chart? or maybe your suggestions to see this amount of tags as bar charts.

 

Thanks for your help!

 

P.S. I'm attaching the two services I created in .txt

 

The above table is what I'm trying to get:

hjimene3_1-1637948599786.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

A question with a description of a similar error was previously - "Totaling valuestream - JSON does not allow non-finite numbers problem": https://community.ptc.com/t5/ThingWorx-Developers/Totaling-valuestream-JSON-does-not-allow-non-finite-numbers/td-p/584993

 

Also some helpful articles:

View solution in original post

4 REPLIES 4

A question with a description of a similar error was previously - "Totaling valuestream - JSON does not allow non-finite numbers problem": https://community.ptc.com/t5/ThingWorx-Developers/Totaling-valuestream-JSON-does-not-allow-non-finite-numbers/td-p/584993

 

Also some helpful articles:

what is the data shape fields of "StreamNumerico" stream? Usually this issue occurs while trying to insert (1/0 = infinity or any string = NaN) kind of numbers.

Hi @Sathishkumar_C , thanks for the feedback. Precisely, there were some NaN values I wasn't aware of. I'm marking @VladimirN as accepted solution since he gave the first answer.

 

Thanks to both of you!

You're welcome.

Top Tags