mindsphere last value paramter

0
Hey everyone, I have got the following problem:  I want to display the latest value of different variables from my mindsphere asset. Therefore I am doing a rest call with the parameter “latestValue”. Because the variables were changed at different times, I got four timestamps. And now my page displays the specific variable for every timestamp. But i only want to display the latest one and only one value for each variable. . Does somebody know how to do that?     ((values are translated via calculated attribute in the last picture)
asked
1 answers
1

Hi Andreas,

Seems that you need an object returned from the DS instead of a list containing multiple objects. 

1. To display only 1 object, you need to change the DS microflow, so it does not return a list but the latest object. The best way to do this is probably to change the REST call in a way that only 1 object is returned (the latest). But, if this is not possible, try to get the head item of the list by using list operation, head on the retrieved list from the rest call. Then, return that object in the DS flow. To do this, change the type at the end event from list to object and select the head object from the list operation. 

2. To display the data from 1 object, you don't use a listview but a dataview. Change the listview to a dataview, and use the changed DS as a datasource. Now, in the screenshot above you are displaying a new listview 3 times, which causes the DS microflow to be executed 3 times, probably with the same result. There is no need to do this I assume, so use 1 dataview and within display all needed values (programmCurrentConverted, stateCurrentConverted and functionCallCurrent) within that same dataview. 

Goodluck! 

answered