• 0

DataSource polls version of an application from a MySQL DB fine but then results in a table widget show as 'NaN'


Jonathan Hart
 Share

Question

Hello,

I've setup a datasource which queries a MySQL DB to get the version of an application.

The datasource shows the result as follows.

image.png.c3da5f65afc736665d3b868150adc134.png

However when putting this in a dashboard widget it shows as 'NaN' like below:

image.png.8ba9580a79f2c7808a35dd03a1e8aa81.png

 

Any help would be appreciated.

Thanks
Jonny

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Unfortunately Datapoints must be valid numbers and strings can't be use. The two periods makes it an invalid number. Generally you can store version data as property data (strings allowed) or you can perhaps change the DataSource to crop the version or drop the 2nd period, for example 4.4 or 4.45 .

Link to comment
Share on other sites

  • 0
  • Administrators

Yeah, do this with a propertysource, not a datasource.

If you are stuck on it being a datasource, do like mike suggests and convert it to a number. You can maintain the dots by pushing each number out by an order of magnitude: 4.4.5 -> 4.004005. This has the added benefit of allowing the sub-versions to take up more than one digit.

Are you trying to alert on the version number?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share