Get the last state of an Object with query definition or REST

Hello ARAS community,

once again o would have your advice.

to be clear, this is what we have in the table of an object : 

id                                  REF_NUMBER_         MODIFIED_                           ON STATE       IS_CURRENT        MAJOR_REV
2154BB99E5F046        B                                 2019-11-06 09:43:54.560       Working           1                            A
2A7B8BD203A54C       C                                 2019-11-06 09:44:03.450       Working           1                             A
5E2A1CD82CD14A       A                                 2019-11-06 09:45:41.210       Saved              1                             A
B3CE5360E24449B      A                                  2019-11-06 09:43:48.837      Working           0                             A

I need as a result to get the line 1, 2 and 4. this correspond to get all the object at the state Working and only the most recent one.

My problem is if i use as filter (state = 'working') AND (is_current = 1) i only get line 1 and 2. the 3 cannot be segregated.

Is it possible ?

Thank you :)

Parents
No Data
Reply Children
No Data