Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
How to get single data from datatable. In my scenario, I need to get sum value and do calculation(divide by 100000). After that, I will put this data into gauge chart.Could Someone help me to fix this problem?
Solved! Go to Solution.
this link can help me fix this problem.
Hi @xiaoqw.
At a high level, you would need to create a service to read rows from the data table and return the value you're interested in. Then within that same service you would need to perform your calculation to get the result, which would then be bound to your gauge widget. Note, there are a number of Get* services that exist within the datatable entity that can be used to return specific rows.
If you run into issues, you can check the Script Log for errors. If you need further assistance, please provide your entities so we can check it.
Regards.
--Sharon
Hi slangley,
maybe you can share with me one example like how to using calculation in datatable. I have no idea about that.
Hi @xiaoqw.
If one of the previous responses helped you to find the solution, please mark the appropriate one as the Accepted Solution for the benefit of others on the community. If you found a different solution, please feel free to post it and mark that as the Accepted Solution.
Regards.
--Sharon
Hi @TracyVolgola.
Apologies for the delay.
We're not clear on what you need to do. In your original post you mentioned that you needed to "get sum value and do calculation(divide by 100000)." Are you actually trying to get an aggregate of all values in a particular column of your datatable which you then need to divide?
Perhaps you can provide us an export of your datatable indicating the column on which you wish to perform the calculation and we can then provide the artifacts you would need to perform calculation and create your mashup.
Regards.
--Sharon
thank you .I already get the point.
this link can help me fix this problem.