My form contains a numeric field called: txt_number, it is computed and it is the sum of two editable numeric fields: txt_no1 and txt_no2.
All the txt_number fields are stored in a view ( to be able to get the element before) , in this way:
@Unique ( @DbLookup( "" : "NoCache" ; @DbName ; "vwTest" ; field1+field2 ; 2 ));
"vwTest" has 2 columns: the first is categorized ( field1+field2 ) and the second one has txt_number as its default column value.
So, the list from my topic question is "vwTest" containing all the txt_number values in the 2nd column.
Let say the first doc saved will have txt_number = 5. When a new doc. is created, and txt_no1 and txt_no2 are calculated , we get txt_number = 10 .
The form has a computed field called txt_diff where I want to obtain the difference between the last txt_number and the actual one.( 10 - 5 = 5 )
So, if then it will be another new form with txt_number = 50 => txt_diff ( on this new created doc ) should be 50-10 = 40.
vwTest: field1+field2 | txt_number
List item
| 1 ( => on this doc, `txt_diff = 1` ) | 10 ( => on this doc, `txt_diff = 9` ) | 23 ( => on this doc, `txt_diff = 13`) .......................
Please , I need your help. Thanks!