6 Replies Latest reply on Jan 30, 2016 7:50 AM by tcoufal RSS
    tcoufal Communicator

    How to get the last result from Data Table

    Hi Guys,

    I am trying to achieve a trend evaluation. I am receiving my properties from a EMS thing. I am saving those values in DataTable Upon data change (I need to use Datatable because I need to have a full row-by-row control over the results).

    I have added few properties like: trendAccCh1, trendSpeedCh1 and so on. These values are type of boolean. Now I would like to change them by comparing the current result and result before (of certain property). Something like that:

     

    If (my.CurrentPropertyValue > my.LastPropertyValue) {my.Trend = false}

    else my.Trend = true

     

    my.CurrentProperty would be the last record in DataTable nad my.LastProperty would be the result before that. Does anyone have a clue how to achieve this?

     

    How to easily access last result and result before that?

    Or any other best-practice when it comes to trend evaluation.

    Thanks