Run Script
Scripts are available to help you to edit entire groups (hit lists) of records at once. They automate simple repetitive tasks, such as adding a field. It is possible to use a script to help you to make changes to every record in a Calm database if required.
There are scripts available to help you to carry out various procedures including:
- Change the case of text in a specified field on records in a hitlist
- Find and report on duplicate RCNs on records in a hitlist
- Find, report on and change duplicate RCNs on records in a hitlist
- Copy text from one specified field to another specified field on records in a hitlist, or on all records in a database
- Add text to a specified field on records in a hitlist
- Swap the text in the RefNo field for the text in the AltRefNo field, and vice versa, on catalogue records in a hitlist.
Please note: In order to run a script, you must have security enabled in the Admin utility and be logged into Calm as an Administrator (have Administrator rights).
Scripts are available in three ways:
- There are a number of "stock" scripts included within Calm. See below for the list of scripts and how to run them.
- Other stock scripts are available from the Calm Helpdesk. Please contact us for instructions about use, as well as backing up and safeguarding of existing data. Scripts supplied by the Calm Helpdesk should be saved in the Cmd folder in the Archive folder in your DScribe folder. On network configurations (client/server) this means the Cmd folder on the server.
- Bespoke scripts. If you have a specific requirement which is not covered by our stock scripts, please contact the Calm Helpdesk. We can advise on the best solution and provide a quotation for the work if necessary. Please Note: Bespoke scripts are written based on information supplied by the customer, therefore they operate in very specific ways in very specific circumstances. It is not recommended that scripts written for one customer are used by other customers.
- Click the Run Script option from the File drop-down menu, a dialogue box is displayed
- Enter the name of the script you wish to run, click OK
- You may be presented with a list of instructions to follow, depending on the script. Follow any instructions, entering data as required
Running a Script
WARNING: You must back up your data before running a script. You will then be able to restore your data if the script does not have the effect you were anticipating.
Please note: It is advisable to practise running scripts on a small number of records first, to ensure that the script has the desired effect, before using it to edit a large hitlist of records.
Stock Scripts
Conform - Compares the fields on each record in the hitlist, to the Admin template (for that particular record type) and adds any fields that are in the template but missing from the record.
FieldCopy - Copies the contents of one field to another, with options to create a new field and erase the source field.
HitListAddField - Adds a chosen field to each record in the hitlist, with an option to insert default text or a serial number (set up in the Admin utility) and another option to add the field even if it already exists on a record.
HitListDelField - Deletes every occurrence of a field from each record in the hitlist.
HitListFill - Inserts the chosen text into the chosen field on each record in the hitlist, with an option to overwrite any existing data and another option to insert the text into each occurrence of the field. This script does not add the chosen text to any text already existing in the field, existing text will either be overwritten completely (if you have chosen that option), or left in tact.
The next two scripts work with the Order Status field, this field is referenced during the document ordering process in CalmView - Calm's web-based front end. Records that you wish to make available to order via CalmView, must have the Order Status field present on the Calm record and it must contain data.
OrderStatusClear - Removes the content from the Order Status field on all records in the hitlist, the blank field remains on the record. As described above, the Order Status field is referenced by CalmView.
OrderStatusSet - Adds the Order Status field (if it does not already exist) to each record in the hitlist and populates it with the text 'ORDERABLE'. As described above, the Order Status field is referenced by CalmView.
SerNum - Enters a serial number (set up in the Admin utility)
into a chosen serial number field, with an option to add the field to
the record if it does not already exist and another option to overwrite
existing content. Please note: This script must be used with care,
Calm often uses serial numbers as a way of joining a record from one
database to a record from another database (e.g. Depositor ID makes the link
between depositor and accession/object entry records). Where this
functionality has been used, do not
overwrite the existing content: this will break the links between your
records.