Inmagic Home Page

Inmagic Script Library

Inmagic's DB/Text user base is discovering the power, flexibility and convenience of scripting...How have you put scripting to work?

When you are designing a form or screen, you can also design a script for use with that form or screen. The script can perform certain operations when the form or screen is opened or closed, or when buttons on the form or screen are clicked. For example, a script can fill in a box on a query screen or perform extra validation on the contents of a field in an edit form. You can use script buttons to bring up field-specific help on an edit form, open a document in its native application from a record display, or move or copy information among boxes on the form. You can write scripts in either JavaScript (JScript) or Visual Basic Scripting Edition (VBScript).

If you would like to contribute to this resource, please take a moment to submit some of the scripts you find most useful in your professional life. We cannot guarantee that every script suggested will be included, but we will respond to every submission. Please submit your idea for a script.

Click on the Script title to display the script and more information. Records are listed here in the [reverse] order in which they were added to the library.

The scripts provided here are NOT supported by Inmagic but are provided as a user resource.

Script Name


Inserting Entry Separators
21 August 2007

This script can be used to edit a text line that has been put/copied into a field and, as you save the record, insert an Entry Mark instead of "comma", "semicolon", "carriage return" or "line feed" in for example a KeyWord list. Could be altered/developed for other purposes.

Dependent Required Fields
20 September 2002

This script is used in an edit screen to make one field required if another field in the form contains data. This will only work for new records.

Edit Record Validation
20 June 2001

This script can be used to make a field required for a form but not for the textbase. This is useful when a textbase has different record types with their own required fields. The user can design different edit forms for the various record types with their own required fields.

Wrapping Routing Lists
1 June 2001

This script is used to break the contents of one box (e.g., a routing list) into two side-by-side boxes -- so you have the names in two columns.

Numbering records for each sort key
1 June 2001

If you use the RECORD NUMBER variable in a form, the numbering continues across sort keys (e.g., when sorting by vendor, if the first vendor listed 5 journal titles, the title listing for the second vendor would start with 6, rather than 1). Often it would be useful to restart the numbering at 1 when the sort key changes.

Automatically Combining Fields
7 March 2001

Automatically create a combined field (named "Combined") from the contents of two other fields (named "Field1" and "Field2"). Both fld1 and fld2 contain multiple entries, and there must be the same number of entries in both, otherwise a warning is issued. Combined is contructed with optional prefixes and suffixes.

Write Report to File and Inmagic Tagged Format
4 May 2001

This script is useful when emulating Inmagic Tagged Format using Write Report to File in Plain Text format when some fields contain carriage returns in the data. It converts each carriage return to a carriage return, angle bracket, so the line will be interpreted properly by Import (rather than causing the record to be rejected).

Use Boolean Words
2 April 2001

DB/Text script to replace Boolean words in DB/TextWorks query screen with Boolean symbols.

Edit Record Functions
14 July 2000

When the record is successfully saved, the Edit window is closed if it's a new record; if the record is part of a set, the next record in the set is opened.

Duplicate record
30 November 2000

When a record is duplicated, specified boxes are emptied out and focus is set to the first one listed.

Alphabetize multiple entries in a field
30 November 2000

When a record is saved this script will take the multiple entries in the field and place them in alphabetical order. The script will work for one or more boxes. Intended for use in an Edit window.

Edit history
30 November 2000

If there are fields in a textbase used to contain information about (a) who edited a record most recently, and (b) who edited it in the past, this script can be used in an edit form to automatically move the information from the first field to the second. This supports maintaining a history of who has edited a record.

Spell check on save
30 November 2000

This script, added to an edit form, will spell-check the record when it is saved.

New query
30 November 2000

The New Query command normally empties out all of the boxes on a query screen without resetting the Boolean state. This script resets the Boolean state of each box to AND when New Query is selected.

Browse choices
30 November 2000

When the box having a script name "box1" gets focus, such as when you tab to it, the validation list for that field appears. The field must have a validation list and be editable. To make this work for more than one box, make copies of this function for each one and change the function names to substitute the script name for each box in turn.

Count sort keys
30 November 2000

This counts the number of unique sort headers or footers in a report, and puts the total into a report footer. It can use either a sort footer box or a sort header box. The sort header/footer box and the report footer box need to be given the same script names as the ones used in the script.

Dynamic 'edited by'
30 November 2000

This script uses the login name, the computer name, and the domain name, all retrieved with the Windows Script Host object (i.e., WSH has to be installed on the end users' machine), and places that info in an 'edited by' box on an edit form. The box is filled in only ONCE when the edit window is open, even if the user clicks SAVE several times before closing the edit window--Unless the form box is cleared, then it will fill it in again.

Sort buttons
30 November 2000

This script supports the addition of script buttons to a report form that will, when pressed, sort the report by a specified field. The script buttons may appear as column heads, and should be report headers. The sample script contains 3 such buttons, to sort by subject, title, and author, respectively.


Submit a Script to the Script Library

Rules for submitting a script:

  • Please fill out every field on the script submission form, including your contact information so that we can get in touch with you should we have any questions regarding your submission
  • Be sure to indicate whether or not you want your named published as the author AND please indicate if you are willing to receive questions from Inmagic users regarding the use and implementation of the script
  • Please review other script submissions and the format in which the descriptions and directions are written. By staying close to the original format, the turnaround time for making the script available will be kept to a minimum

Recently, participants on Inmagic's Online Discussion Group have suggested that we establish a scripting library and have offered to share scripts that they have developed and tested.

If you would like to help build this resource, please take a moment to suggest some of the scripts you find most useful in your professional life. We cannot guarantee that every script suggested will be included, but we will respond to every submission. If you simply have an idea for a script, click here.

Our thanks, in advance, for your willingness to help build a resource for all!

Please include contact information so that we may get in touch should we have any questions about your submission. We cannot accept submissions without this information. Thank you.


E-mail Address:



Script Type:

Script Language:

For use with which Inmagic Product?

The minimum version required:
 4.0  4.1  4.2
 5.0  5.1  5.2

What is this script helping you do?

Please include your script below (copy and paste).

Are there any notes or special instructions for this script?

Do you want your name to be published as the Author? Yes No

Are you willing to be contacted by Inmagic users regarding the use and implementation of this script?
Yes No


*all scripts submitted become the property of Inmagic, Inc.

Submit a Script Idea

If you have a script of your own you'd like to submit, please click here. If you don't, we'd love to hear your ideas so that we may include more scripts in the Script Library or in one of our products.

Let us know how we can make your job easier!

Please include your e-mail address so that we may get in touch should we have any questions about your submission.

Your e-mail:

Your idea:

Copyright 2003-2012 Inmagic: 600 Unicorn Park Drive, Woburn, MA 01801 | 781.938.4444 | Toll-free: 1.800.229.8398
Home | Partners | Services | Social Knowledge Networks | Social Library Solutions | Privacy Statement | Terms of Use | DCA