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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

get single data from datatable

xiaoqw
15-Moonstone

get single data from datatable

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?

ACCEPTED SOLUTION

Accepted Solutions
xiaoqw
15-Moonstone
(To:xiaoqw)
6 REPLIES 6
slangley
23-Emerald II
(To:xiaoqw)

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

xiaoqw
15-Moonstone
(To:slangley)

Hi slangley,

 

maybe you can share with me one example like how to using calculation in datatable. I have no idea about that. 

slangley
23-Emerald II
(To:slangley)

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

slangley
23-Emerald II
(To:xiaoqw)

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

xiaoqw
15-Moonstone
(To:slangley)

thank you .I already get the point.

xiaoqw
15-Moonstone
(To:xiaoqw)
Announcements


Top Tags