Skip to main content

Getting Domino Databases to Work on Mobiles without Extra Technology - Part 2

As promised last time, I'm going to have a look at views.

Suppose we decide to have a view called ITContacts.

We will also need a form called $ViewTemplate for ITContacts.

We can't change the $ViewTemplateDefault form because changing this will affect other web views of the database. Of course, if your database isn't otherwise available on the web, you can save yourself some trouble because otherwise you'll need to create a $ViewTemplate for each view that will be available on the mobile.

Tips for the View
Creating this view is pretty much the same as creating any other Notes view except that you need to be conscious of how much data you're pushing out.

For example;
Your normal web or notes view of IT Contacts might have;
|FirstName | Surname | Company | Phone | Fax | Mobile | Email | Support ID | Address | City | State |

This is fine for a wide screen but isn't at all useful on the mobile.

Concatenation
Consider concatenating fields; eg:

Instead of the first two fields, try...

@IF(@Trim(FirstName) != "" ; FirstName + " " + Surname ; Surname)


Use HTML to Spread out Vertically
Instead of having a whole heap of columns, consider doing everything in two but using HTML to space things out more neatly.

Your first column would be the link to from the view to the full document. Just make it something small - even an "X" would do the trick.

Your second one would contain useful things...



Obviously your html would be more polished than this, you'd use an @IF like the firstname bit to check whether the Email address existed before writing the html for it.

The end result would be that you end up with a view that displays each record on the web like this.

X Roger Wilco
Space Janitors
Phone: 06 9506 5080
Fax: 06 9059 8905
Email: rwilco@spacejanitors.com

instead of a columnar format.

Obviously the views would be slightly different for different databases.
Note also that we've ignored the address. If you can, you should try to suppress unnecessary information on the VIEW, save it for the form.


The $ViewTemplate for ITContacts.
This is just a normal notes form with an Editable text field in it called $ViewBody

The important thing is how you structure your menus.

Here's an example of how I did my form - the links go nowhere though.

IT User Manual - IT Contacts
Menu | Prev Pg | Next Pg | Search


[$$VIEWBODY]



Menu | Prev Pg | Next Pg | Search

Other IT Books
IT Contacts
Systems
Inventory
Statistics
Disaster Recovery


The Menu Link should go to:
Named Element, Page, Mobile

The Search Link will contain formula similar to the following;
DB:= @Implode(@Explode(@Text(@Subset(@DbName;-1)); "\\");"/");
SearchURL := "/"+DB+"/msearchdb?Openform";

@URLOpen(SearchURL)

(for more info on the search facility - see How and Why to use Different Search Templates in Domino)

The Other IT Books links will contain links going to;
Named Element, View, Mobile\Contacts etc..

That leaves only the Prev Pg and Next Pg Links.
These should have formula for...

@DbCommand("Domino"; "ViewPreviousPage")

and

@DbCommand("Domino"; "ViewNextPage")

respectively.

Note that I haven't been able to get these two commands to work on Opera Mini or the Blackberry Browser even though they work fine in a normal browser. When I have an update on this, I'll post it.


I haven't covered forms, because there's not a lot to do with them. I suppose you could try to launch a different form from the mobile views... (one with less graphics). I'll consider it as a future project.

Notes also has a "hide when" for Mobiles which would be good for graphics if phones were reliable. Apparently the blackberry doesn't see itself as a mobile browser.

So... There you have it. Who needs a fancy API (or even a Blackberry) to get things working on the Mobile?

Comments

Popular posts from this blog

How to Change Your Notification Options for New Lotus Notes Mail in version 8.x

Don't worry, I'm not patronizing you (my readers), I just decided to re-document this for one of our internal users and thought you might want to be able to use it in your own user documentation. WHAT IS THIS DOCUMENT ABOUT? Some people who don't get a lot of mail, like to be notified when such an event occurs. Notification can be; via a sound via a pop-up box via the system tray (where the computer clock is) The pop up box looks like this; Other people, who like myself, get too much mail would rather not be notified. The aim of this document is to tell you how (and where) to turn these options on and off. CHANGING YOUR SETTINGS To change your settings from the Notes 8.x client; On the Menu, click File , then Preferences... On the left hand side , click on the little plus sign to the left of Mail to expand the options. Click on the option marked Sending and Receiving . In the middle section, under receiving, you can control your notifications. If you untick the box mark

How to Create an Auto-Response Mail Message in Lotus Notes 8.5.3+

Why would you do this? Suppose that you have an externally accessible generic email address for your company; support@mycompany.com or info@mycompany.com. You might expose this to the web and allow people to send messages to you. Setting up an auto-response email will tell the senders that their message reached its destination and that it will be dealt with accordingly.  It's also good practice to include links to FAQs or other useful information. Why 8.5.3 The techniques we'll be using here work in older versions of Notes but some of the options seem to have moved around in 8.5.3.  I figured it was a good time to show you where they've moved to. The Procedure Start Domino Designer and open the Mail file to be modified.  A really quick way to do this is to right-click on the application tab and choose "Open in Designer". In the Left hand panel of designer, expand Code and then double-click Agents.  A new window should appear. Click the action

How to Do a Mail Merge to Email using Lotus Notes

Why do one? In today's "green" world, it makes much better sense to send out emails than letters but you still want to personalize them. Sadly, by itself Lotus Notes doesn't support mail merge to email. Of course, we know that outlook does (but then it lets anyone and anything send emails for you - even when you don't want them to). So, how to do it in Notes? OpenNTF The first port of call is OpenNTF ( http://www.openntf.org/ ). This place is full of great things but most of them are really badly documented. Still, these guys give things away for free and they develop in their spare time, so we should be grateful for what we get. There's a great little project there called MailMerge Excel to Notes . Go there, click on releases and download the ZIP file. Getting to the Code The installation is tricky though I've noted that since I asked the author about the install, it's been updated (so maybe these steps are less necessary). Unzip the files to somewher