lotus-noteslotusscriptlotus-formula

Is there a way to filter information from a view and display them in the same view?


two months ago i asked this Question: How do i write more complex code in Lotus Notes views. My View now looks like this:

Year Month Device Counter Times(Minutes) Times(Hours)
2021
January
Test 01 270 4,5
Test 02 210 3,5
Test 01 60 1
Test 01 90 1,5
February
Test 01 30 0,5
Test 02 180 3
Test 01 60 1

The Database sets a new Document every time a Device is lend out. What i want to do now is to read trough every document and combine "Times(Minutes)" and "Times(Hours)" inside an variable, and also save each device name one time.When a device name is scanned more then once, the counter will go up by one. In my Lotus script program i did this using a Multi-Dimensional Array.

I Want to do this because i want to display each Device only One Time. Then each device has the combined values inside the "Times" Columns, and a counter to show how often the Device has been lend out in the chosen month. It should look like this:

Year Month Device Counter Times(Minutes) Times(Hours)
2021
January
Test 01 3 420 7
Test 02 1 210 3,5
Feburary
Test 01 2 90 1,5
Test 02 1 180 3

Solution

  • If you set the device column to be categorised, and set totals on the Times columns properties, this will give you what you want. It will have the benefit that you can also see the total times across the month for all devices before you drill down