First published March 2006
I don't know if you remember in the 90s, the thing on the Mac that let you define all sorts of wacky error messages on your friends' computers. “The radiation shield on this Macintosh has failed. Please step back five feet” was the default, I believe.
Well, it might not have the same impact, but you can do the same kind of thing in OpenOffice.org Calc spreadsheets.
Pranks of course are great but you can actually use this Calc feature for good, useful, pure and high-minded purposes as well. You can do online help, error messages, data entry lists, restrict the maximum characters in the field—and so much more.
Let's say you're in charge of creating all the forms people fill in. Obviously, sometimes they fill them in wrong. You can build in business logic, i.e. you can set up the spreadsheet so they can't fill it in wrong. Or you can at least make it a lot harder.
Window Walkthrough
Select one of the cells in your spreadsheet and choose Tools > Data Validity ( in 2.0.1 and earlier) or Data > Validity (in 2.0.2 and later). Take a look at the first tab, Critera. You can restrict entry in that cell to whatever is listed here.
Then to enforce what you specify here, go to the Error Alert tab and set up your error message.
If instead of controlling what's entered, you just want to provide guidance, then it's time for input help. Select the cell or cells, choose Tools > Data Validity ( in 2.0.1 and earlier) or Data > Validity (in 2.0.2 and later), then go to the middle tab, Input Help, and enter some information help that's displayed when users select the cell.
Sample Procedure Using Criteria, Input Help, and Error Messages
Here's what I did with a sample spreadsheet.
In this sample, customer service representatives have a simple form they need to use to enter customer service Incidents.
In the date field, I've observed that people enter the current date rather than the date when the customer service indicident occurred. So I'm going to offer a little gentle help for what to put in the date field. I selected the Event Date field where the date goes, chose Tools > Data Validity ( in 2.0.1 and earlier) or Data > Validity (in 2.0.2 and later), and clicked the Input Help tab. I typed in some information for users to see, and clicked OK.
Here's what that help looks like when someone selects the field.
The next field, Customer Type, is easy since there are only three types of customers. The customer service reps don't always remember this correctly, though, or they like to make up their own types. Therefore I decided to create a data entry list. I selected the field where the customer type goes, chose Tools > Data Validity ( in 2.0.1 and earlier) or Data > Validity (in 2.0.2 and later), and clicked the first tab, Criteria. I selected List, then just typed the items in the list, pressing Return after each. Then I just clicked OK.
Here's what the list looks like in the spreadsheet (sorted alphabetically).
The Description field, which is several cells merged together, is of course for the description. I want a short description, though, and the customer service reps go ON and ON and ON..... So I'm limiting the description to 100 characters. I selected the field where the description goes, chose Tools > Data Validity ( in 2.0.1 and earlier) or Data > Validity (in 2.0.2 and later), and clicked the first tab, Criteria. I made the indicated selections to accept a maximum number of 100 characters.
Then I clicked the third tab, Error Alert, to enforce what I've just done, and created a Stop error message. I typed the title and the message, and clicked OK.
Here's what the error message looks like when people type in too much text. It appears after users tab off the cell.
Here's what the whole spreadsheet looks like now.
That's about it. This is a pretty powerful and flexible feature; I haven't shown you much of the Criteria tab at all, so go ahead and take a look at that a little more if you find this feature interesting. With some imagination you can come up with a lot more applications for it than I have here.
Its Data/Validity in 2.0.2 not Tools/Data Validity
Posted by: Martin Hooper | March 15, 2006 at 09:05 AM
http://openoffice.blogs.com/photos/uncategorized/list.gif
missing
Posted by: Butidont Wnantto | May 21, 2008 at 10:35 PM