Tech Blog

Script to Remove an Item from a Large Set in Alma

Removing an item from a large set in Alma can be difficult if you need to navigate through a large number of records. This web tool will allow you to remove an item (one at a time) without the need to wade through lots of records.

After submitting the set ID and a barcode, the Manage Members API is invoked which does a POST to remove the item from the set. On successful completion a confirmation message is displayed.

Error messages are displayed if the API action fails.

An API key will need to be stored in the file_containing_api_key.php file and this placed on a non-public directory of a web server, although you can run this locally on WAMP.

The tool requires 5 files:

  • set_item.xml
  • enter_barcode.html
  • setScripts.js
  • remove_set_item.php
  • file_containing_api_key.php

Files available on GitHub:

The enter_barcodes.html displays the form that is posted to remove_set_item.php file using a JavaScript function in setScripts.js. The set_item.xml temporarily stores the barcode identifier which sent by the API in the body of the POST request.

Leave a Reply