Skip to the content Back to Top

If you have a Computed Number field in a DB/TextWorks database, especially one with many fields in the calculations, note that EVERY field used in the calculation must have a value in it, even a 0. 

For example, if you are adding up fields such as List Price, Discount, Federal Tax and Local Tax, but Local Tax is often empty in most records, the calculation will fail.

Unfortunately, no error message is provided. One might be tempted to rebuild a field index or recompute the values, but that won't resolve the problem.

To help avoid this, make all of the fields used in a calculation required field, so you are forced to at least enter a zero in each one.

Over the life span of a database, fields may be added and removed. In DB/TextWorks, the position occupied by a deleted field in the textbase structure is retained and appears as <Deleted> when viewing and editing the structure.

deletedfields.png

This poses no problem when using the database and these entries will never appear except when viewing or working on the structure. However, some folks like a tidy database, or don't wish to scroll through a long list of these. Here's how to hide or remove these entries.

Hide Deleted Fields

1. From the DB/TextWorks menu, with the textbase open, choose Maintain > Edit Textbase Structure > Edit Fields.

2. Select the Hide Deleted Fields Checkbox.

3. Choose Finish and OK to save the changes. 

hidedeletedfields.png

Deleted fields now no longer appear in the list of fields when editing the textbase structure... until the next time you open this tool. Unfortunately, the option to hide fields isn't retained.

Remove Deleted Fields

The only way to permanently remove fields that have been deleted from a DB/TextWorks textbase is to recreate the textbase, like this:

1. From the DB/TextWorks menu, with the textbase open, choose Maintain > Edit Textbase Structure > Export to create a .tbb file (or .cbb if you have DB/Text for SQL) containing the textbase structure. This export omits deleted fields.

2. Export the forms, query screens, sets and record skeletons using Maintain > Manage Textbase Elements.

3. Close the textbase, then from the DB/TextWorks menu, choose Manage Textbases > Dump Textbase to create a .dmp file of all the records in the textbase. You can can also use File > Export with the textbase open to do this, but have to carefully select the export options in this case.

4. Using File > New Textbase, create a new textbase in a different folder with the same name, choosing "Import from Textbase Structure Definition File" and the .tbb or .cbb file you just created as the basis for the new textbase. DO NOT select "Copy an Existing Inmagic Textbase Structure" and your existing textbase .tba or .cba file as that will just create a new textbase with the deleted fields still present

createtextbasestructure.png

5. Import the forms, query screens, sets and record skeletons.

6. Use Manage Textbases > Load New Textbase to load the data from the .dmp file

7. View the textbase structure and verify there are no deleted fields.

8. Replace the existing textbase with the new one (but keep a backup of the original!).

When editing a DB/TextWorks form, query screen or menu in the WYSIWYG designer, a pop-up Box or Form or Screen Properties window is used to change certain settings. When closing this Window, its last known position on your screen is remembered for the next time you open it.

However, if you happen to change your screen resolution, or acquire a new screen, or for other reasons, it's possible that the next time you access this properties window, it won't be visible. Usually this is because the remembered position is now located "off screen".

Whatever the cause, the remedy is to remove the remembered last position and restore the window position to its default placement. This remembered last position may be stored in the system-wide inmagic.ini file, or textbase specific .idi files.

To locate the system-wide inmagic.ini file, with DB/TextWorks and a textbase open, choose Display > Textbase Information and search for inmagic.ini to locate the path to the file. 

Close DB/TextWorks then open the inmagic.ini file in a text editor.

In the [Designers] section of inmagic.ini, set the values for ToolXPos and ToolYPos to 0, or remove those lines, then save the file.

In the same folder that contains the inmagic.ini file are files related to each textbase you have opened. Locate the .idi file for each textbase (e.g. Catalogue.idi for a textbase called Catalogue). Note: .idi is not a typo; it's not an .ini file, but an .idi file.

Open this file in a text editor and remove any entries under the [Designers] heading, if any exist. 

Re-start DBTextWorks and try to open the properties window again.

Bonus tip: while editing the .ini and .idi files, you may have noticed a [Window Placements] section. Remove this, or entries under it, if any of the main DB/TextWorks Windows ever go missing (e.g. a query screen or edit form).

Have you ever wanted a list of all the files from one or more folders on your computer or servers? 

Perhaps you have thousands of PDFs and want to see how they are named and organized, but listed in a single document?

Perhaps you then want to take this list and use it as the basis of “starter records” in a database with the file name and perhaps information extracted from the file and folder names as the title, author, subject, date, etc.

The starting point for all of this is to run a command on your computer to generate a list of all the files, saved as a text file.

PowerShell

PowerShell is a modern command-line interface used to interact with Windows. You can find it in your Start menu.

The syntax for the command you will want to run is

Get-ChildItem -Path CRAWLPATH -File -Name  -Recurse -Force  | Out-File OUTPUTFILE

where

CRAWLPATH is the location of the documents you want to list

and

OUTPUTFILE is the location and name of a text file to create with a list of files and folders.

For example, if you have a collection of PDFs in folders on a network server and that server is available to you as your G drive, your command might look like:

Get-ChildItem -Path “G:\Documents\PDFs\” -File -Name  -Recurse -Force  | Out-File PDFs.txt

In this case, the PDFs.txt file will be generated in the folder from which you are running PowerShell, as shown at the PowerShell prompt. You could also specify a particular folder into which the text file will be created.

If your folders contain more than just PDFs, but you only want a list of PDFs, you could limit the CRAWLPATH to “G:\Documents\PDFs\*.pdf”

Learn more about the Get-ChildItem command and other available options here.

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.4

Command Prompt

The Windows Command Prompt is the successor to Microsoft DOS, the non-graphical operating system that came before Windows. You can find it in your Start menu.

The procedure is similar as with PowerShell but the command is different. For example, this command:

dir /b /s “G:\Documents\PDFs\” > PDFs.txt

generates a list of all .pdf files in the current folder, and subfolders, in a bare format. 

If you have imported, typed or pasted information into a textbase from another source, you may have lines of text that are separated only by line feeds, rather than entered as subfields. They may have appeared to have the correct layout in DBTextWorks, but when displayed on the web, such as in Andornot Discovery Interface search results, may appear to run together.

For example, text that started out like this:

Contents

Chapter 1: Feasibility

Chapter 2: Accountability

Chapter 3: Operational Issues

may appear online as:

ContentsChapter 1: FeasibilityChapter 2: AccountabilityChapter 3: Operational Issues

To have this appear as intended, you could edit each record individually, but a faster way is to use DB/TextWorks to Batch Replace those line breaks with subfield marks.

To do this:

1. In DB/TextWorks, search for all records with data in the field requiring modification, using the * wildcard in that field.

2. Select Records > Batch Modify from the menu.

3. Complete the Batch Modify dialogue as follows:

Field to Modify: select the field requiring modification

Operation: "Substitute Text"

Affects: Matching

Find What: {LF}

Replace With: {SF}

{LF} represents a line feed or paragraph break. {SF} represents a subfield indicator.

4. Perform the batch modification to change all occurrences of the line feed character in the selected field in the selected records to a subfield indicator.

Note: If you are at all in doubt about the batch modification process, backup your complete database before making any changes.

Categories

Let Us Help You!

We're Librarians - We Love to Help People