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