Cardbox Talk


CardboxForumsCardbox Talk > "Sequencing"


Posted By Post


19-Jun-2008 15:07

I have problems with sequencing catalogue numbers at my museum.

Some items appear in odd places, particularly, but not only where there is a suffix.

Our numbers are typically 2008.001 etc but there may be a suffix such as 2008.001.1 and so on.

Any advice welcome.


19-Jun-2008 15:35

Of course you got problems...
In the Cardbox Help is to find that numbers with two dots are intrepeted as a date....

Perhaps is the best thing to do to replace the dot for an underscore by batch edit, search and replace "." to an underscore ("_").
I think your sort problem is solved then.


Charles Welling

24-Jun-2008 09:47

Bert's advice is sound, but perhaps the use of the underscore may be confusing as the dots may appear on labels or other printed output. Also, if you use underscores in other fields of your database and you substitute them for spaces when you print, your numbers would also appear without underscores.

A perhaps better alternative for the common dot is the "middle dot" (alt 183). It looks like a dot, but it is placed just a little bit higher than the common dot: "·".
When you substitute your dots for middle dots, Cardbox will NOT interpret these numbers as dates but as ordinary numbers, and it will index and sort "2008.001.1" as "20080011".

If you would like to have Cardbox treat these numbers as words, you should modify the collating table (see Help). Add the middle dot to the table as an indexable character and add the command CHECKWHOLETERM to the table as well. Cardbox will then treat your numbers as words and index them as "2008·001·1".

Typing these middle dots is easy if you create the following macro:

TypeText "·"

Assign this macro to your keyboard, e.g. to the keystroke ALT + .

(This keystroke is similar to keyboards that have an "Alt Gr" key, where middle dots can be typed in any application by AltGr + .)

If you would like to use this solution, but you are not familiar with collating tables, please let me know.


1-Jul-2008 14:36

Thanks both.

I'll have to think about your idea Charles, unforunately others enter data and also this will be ongoing so, in the future, the idea may get lost.

Someone here suggested typing a space after each dot which would leave the number easily recognisable.

I'll do a bit of experimenting. I'm not sufficiently adept to create and use macros, so I may be back.


Charles Welling

2-Jul-2008 09:07

Typing a space after the dot would be disastrous for your sequencing. Cardbox looks at the FIRST indexed word, number or date. Typing spaces would make Cardbox ignore anything that comes after the first space. So, when the first record contains "2008. 03. 01" and the second "2008. 01. 01", the sequence would remain unaltered, when in fact the two numbers should be swapped.

As far as "the idea may get lost" is concerned, remember that you may create macros that run when the record is saved. The use of such macros has been widely discussed in this forum.

Such a macro could be:


When you attach this macro to the "Save" button in the native format, this macro will always run when records are saved in this database. Users can type the common dot if they like, but they will always be replaced by middle dots. And, if you would add the following line (either in first or second position in the macro)

dots=Replace(Fields("CATALOGUE_NUMBER")," ","")

any inadvertently typed spaces would be removed as well.



2-Jul-2008 12:41

Charles, you're right if you're talking about sequencing on a single field -- either by using View > Sequence > Field or by slow-right-clicking on the field and selecting "Sequence" from the pop-up menu.

On the other hand, if you use View > Sequence > Custom Sequence, and define a custom sequence that uses just the field you're interested in, then Cardbox will look at every word/number in that field, not just the first one.

Custom sequences are a little more cumbersome than the "instant" one-field sequences, but in cases like this they may also turn out to be more powerful.

© 2010 Cardbox Software Limited   Home