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 a Bootable DVD Using Nero Burning ROM 9

I often need to create bootable CDs and DVDs but it's weird because I frequently end up buring myself a new coaster instead. It's not that the process is difficult, just that nero has a few too many options and I forget which ones to choose and end up picking the wrong one. I figured that the best way to avoid this mistake in future would be to write the steps down. Procedure Insert CD or DVD into your DVD Burner. Start Nero Burning ROM 9 Choose DVD-ROM (Boot) or CD-ROM (Boot) depending on what you're creating You'll be prompted for a disk image source. Choose a Nero Source - you'll usually find them somewhere like this... C:\Program Files\Nero\Nero9\Nero Burning Rom\DOSBootImage.ima Leave the Boot Locale as English - unless you really need a different keyboard layout Tick the box marked [X] Enable Expert Settings Choose Hard Drive Emulation and leave any other settings as they are. Click the button marked New Add any files you want but don't try to add operati...

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 ...