Notes Mail Database Size Indicator – graphic version

Remember last week’s Notes Mail Database Size Indicator? Mike O’Brien and John Head referred to Notes 8.01, where this will be included. I liked my solution, but after seeing the screenshot, it looked a bit pale.

The new challenge was to give it a more graphical look. So I created another version, still very easy to implement, but with a better look. It conditionally displays an image of the total and used space:

  • A green bar for used space less than 70%
    Mail Database Size Indicator - status green
  • An orange bar for 70-89%
    Mail Database Size Indicator - status orange
  • A red bar for 90-100% (and up)
    Mail Database Size Indicator - status red
  • A gray bar if no quotum exists.
    Mail Database Size Indicator - no quotum

There’s still an indication of the quotum, but for the particular version I had to develop, my customer doesn’t want that, so the screenshot are not 100% accurate (but I’m too lazy to replace them ;-))

How to implement?

From a designer’s perspective, you need to know if you want it for yourself only (and prohibit design refresh) or for the whole company (do the adjustments in the mailfile template). Obviously, you should first test in your own mailfile.

These are the implementation steps:

  1. Copy form DbSizeGraphicfrom the Mail Database Size Indicator Demo database and paste it in your mailbox template.
  2. Copy all image resources starting with mailsize from the database and paste them in your mailbox template.
  3. (At least for version 6.5 of Notes) Change frameset MailFS Left by adding an extra frame with height=40px (width=relative 1).

How does it work?

  1. With Fireworks, I created example graphic images for all four types (empty/green/orange/red)
  2. For each graphic I export a 5px wide left, middle and right part (t.i. for f.e. green, I don’t need a right part)
    Mail Database Size Indicator - sources
  3. Then, in the form, I needed to construct the progress bar. Say, f.e. for a 35% progress, the total image is constructed out of 20 segments, 7 of them are green, 13 are gray. This is how it looks like in Designer:
    Mail Database Size Indicator Form - how does it work
  4. Field Score is the percentage for the bar, calculated in the PostOpen
  5. Field NrOfSegmentsis the number of segments used to construct the bar. If you ever want to customize this solution for other purposes, the number of segments and width of the segments are parameters for bar size and precision (more segments is higer precision)
  6. Field FilledSegments calculates how many segments need a color, f.e. for a Score of 50, we need 10 colored segments.
  7. Field ImgStatus defines when to use what color, f.e. for scores <70, we need green, this is "1" (orange is "2", red is "3")
  8. Field ImgValues is the result of the calculations: a list of strings representing the images to use. Here’s an example:
    Field ImgValues Example
    The values correspond with the aliases for the images in the image library.
  9. Finally, the segments itself are computed images with @Text(ImageValues[x]) as code, where x=the number of the segment. @Text is needed by the computed image, to make sure it’s text. Note that the segments are held together by a single-cell table. Without that, a resize of the mailframe may result in a linebreak, splitting the bar in 2.

You can reuse and customize this solution in other applications by changing the graphics and the number of segments (both in the field NrOfSegments and the actual number of images for the segments + their computed values).

12 Comments

  1. Good job, it work’s on dwa ?

    Reply
  2. Thanks! I didn’t test on the web, didn’t have the time. Anyway I don’t believe it works as it is now. The status is calculated in a postopen script, so it needs to do the same in the webqueryopen then.

    Reply
  3. Hey Martin,
    I was just to think about the exact solution for a scoring requirement in my current project(based on your webding progress bar article). I wanted to use user-defined colors for each set of scores. Thanks very much, you saved me some time -:)

    Reply
  4. :-) Glad you liked it. Gives you some more time to buy that Mac of yours ;-)

    Reply
  5. Definitely!, it will be the first thing I do when I arrive in Kuala Lumpur tomorrow. My windows crashes is driving me nuts – can’t wait for an online order to arrive

    Reply
  6. Excellent ! With this kind of stuff, I could manage my users who say ‘Lotus Notes is not pretty, I prefer Outlook blah blah blah’
    Thanks a lot !

    Reply
  7. This will change even more when you install Notes 8 :-)

    Reply
  8. I like it. Have to tweaked it a bit for my R7 mail template like change the background color and text color to R7 blue, increase the left margin a bit, place the form on “Mail FS” instead of “MailFS Left” and decrease its height a bit to match my inbox horizontal scroll bar.

    I might also place a hotspot image to “manually” refresh the status bar for some of my users who are too lazy to close their mail database and re-opened it.

    Reply
  9. Hi Tinus,

    Thanks a lot! The manual refresh button is a good idea. An alternative is the code I put in the R8 version, which automatically refreshes the indicator every 15 minutes.

    Regards,
    Martin

    Reply
  10. Hi Martin

    I have taken a look at your R8 mailDB sample.
    If I just outright copied all the code on the MailSize form (PostOpen and the two functions) it would give me Object variable not set error when I preview my mail database.

    I take a look at your function and see that you set doc via this code -> set doc = uidoc.Document – but you haven’t declare uidoc in that function. I am not sure if it is declared elsewhere. Since the timer function is the oly one I am interested in, I just copied the code on the form and modified it accordingly.

    Reply
  11. Hi Martin,

    I’m having problems getting this working on my mail template… Have copied over the form, the images, added a new frame, etc and nothing is showing?

    Any help?

    Cheers Greg.

    Reply

Trackbacks/Pingbacks

  1. The Conxsys Blog » Blog Archive » SnTT: Adding a Database Size Indicator to Notes 8 - [...] you begin by stealing, err, leveraging Martin Vereecken’s work. His implementation addresses Notes 7 and below, but we are …
  2. BizzyBee’s BizzyThoughts » Blog Archive » Notes Mail Database Size Indicator for Notes 8 Basic - [...] creating a Notes Mail Database Size Indicator - graphic version, a version for Notes 8 Standard was introduced on …
  3. view current and maximum mailbox size in a bar chart ? | keyongtech - [...] maximum mailbox size in a bar chart ? I want to give some examples of …

Submit a Comment

Your email address will not be published. Required fields are marked *

22 − 14 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>