How to Adding Autocomplete support to MARC21 Catalogue in koha | Book Data Entry page

Adding auto-complete feature to Koha’s MARC21 biblioitems field (Imprint – place, name of publisher, ISBN,edition, etc) as a cataloging aid.

Step - 1

Go to : Koha administration/Global system preferences/Staff interface/IntranetUserJS

Below the Java script  enable of the auto completed in four columns for ISBN, Place of publication, Name of the Publisher, Edition

Copy and paste the bellow JS Coding.


//**Autocomplete support to MARC21 catalogue**//  
$(document).ready(function(){
$( '[id^="tag_260_subfield_a"]' ).autocomplete({
    source: function(request, response) {
      $.ajax({
        url: "/cgi-bin/koha/cataloguing/ysearch.pl",
        dataType: "json",
        data: {
          term: request.term,
          table: "biblioitems",
          field: "place"
        },
        success: function(data) {
          response( $.map( data, function( item ) {
            return {
              label: item.fieldvalue,
              value: item.fieldvalue
            };
          }));
        }
      });
    },
    minLength: 1,
  });

 $( '[id^="tag_020_subfield_a"]' ).autocomplete({
    source: function(request, response) {
      $.ajax({
        url: "/cgi-bin/koha/cataloguing/ysearch.pl",
        dataType: "json",
        data: {
          term: request.term,
          table: "biblioitems",
          field: "ISBN"
        },
        success: function(data) {
          response( $.map( data, function( item ) {
            return {
              label: item.fieldvalue,
              value: item.fieldvalue
            };
          }));
        }
      });
    },
    minLength: 1,
  });
  
  $( '[id^="tag_260_subfield_b"]' ).autocomplete({
    source: function(request, response) {
      $.ajax({
        url: "/cgi-bin/koha/cataloguing/ysearch.pl",
        dataType: "json",
        data: {
          term: request.term,
          table: "biblioitems",
          field: "publishercode"
        },
        success: function(data) {
          response( $.map( data, function( item ) {
            return {
              label: item.fieldvalue,
              value: item.fieldvalue
            };
          }));
        }
      });
    },
    minLength: 1,
  });

 $( '[id^="tag_250_subfield_a"]' ).autocomplete({
    source: function(request, response) {
      $.ajax({
        url: "/cgi-bin/koha/cataloguing/ysearch.pl",
        dataType: "json",
        data: {
          term: request.term,
          table: "biblioitems",
          field: "Editionstatement"
        },
        success: function(data) {
          response( $.map( data, function( item ) {
            return {
              label: item.fieldvalue,
              value: item.fieldvalue
            };
          }));
        }
      });
    },
    minLength: 1,
  });
});

Click Save Button.

Step - 2

Go to : Home/Cataloging/New Record (Enter the all bibliographies details )


References:

[1] http://www.loc.gov/catworkshop/RDA%20training%20materials/LC%20RDA%20Training/Module1IntroManifestItemsSept12.doc

[2] https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started

[3] https://gist.github.com/l2c2technologies/7d0449dcb80c90880381ef4571003d1d

[4] http://catb.org/jargon/html/H/hack.html

[5] http://blog.l2c2.co.in/index.php/2017/01/15/adding-autocomplete-support-to-marc21-260-264-imprint-fields-in-koha/

Post a Comment

16 Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. Clicktots International Technologies offers high-quality SEO services. Our services quality has made our clients call us the Best & Top SEO Company/Agency in Chennai.

    SEO Services in Chennai

    ReplyDelete
  3. https://techubber.blogspot.com/?m=1

    ReplyDelete
  4. H, i need to do that for a title. I edited to get the titles but got no response. can you help me?
    $( '[id^="tag_245_subfield_a"]' ).autocomplete({
    source: function(request, response) {
    $.ajax({
    url: "/cgi-bin/koha/cataloguing/ysearch.pl",
    dataType: "json",
    data: {
    term: request.term,
    table: "biblioitems",
    field: "title"
    },
    success: function(data) {
    response( $.map( data, function( item ) {
    return {
    label: item.fieldvalue,
    value: item.fieldvalue
    };
    }));
    }
    });
    },
    minLength: 1,
    });

    ReplyDelete
    Replies
    1. Sry, Title and Authors filed not working in autocomplete options.

      Delete
  5. Very Informative and creative contents. This concept is a good way to enhance the knowledge. thanks for sharing.
    Continue to share your knowledge through articles like these, and keep posting more blogs.
    And more Information Online Doctor Consultation App

    ReplyDelete
  6. Such a nice article I read all your blogs because I get some knowledge. Keep it up! I am would like to suggest my blog How Long Does iOs 15 Take To Install?.

    ReplyDelete
  7. Such a informative article fabulous ! thanks for sharing this. I would like to share my blog how to fix the last line no longer available error on iPhone.

    ReplyDelete
  8. Very Informative and creative contents. This concept is a good way to enhance the knowledge. thanks for sharing. Please also visit my website:
    how to fix Kmode Exception Not Handled error.

    ReplyDelete
  9. Sorry, Title and Authors filed not working in autocomplete options. I would like to share my blog about how to fix the last line no longer available error on iPhone.

    ReplyDelete