This is a strange question, I know, but I actually have a need to be able to hold on to the indicators from the various MARC fields that have them and to put those indicators into CCK fields.

Right now, the indicators aren't turning up even in the MARC view. From what I can see in marc.pages.inc, it looks like they're expected to be there ($i1 and $i2 appear in that file), but I wonder if those are getting eliminated at lines 66-67 of marc.legacy.inc. (It's an array_splice, and the comment reads "Get rid of indicators," but I could very well be missing something here.

As I say, though, what I really need is to figure out how to get the indicators into fields in my nodes. Any tips on how to grab those?

Comments

benjamin.pauley’s picture

Version: 6.x-2.x-dev » 6.x-2.0-beta3

Correcting version (sorry!).

aaustin’s picture

In the $marc->legacy array the indicators are stored in the keys i1 and i2 within the subfield. The note that says "Get rid of indicators" is a bit misleading, the indicators have already been read and stored in the array at that point - see the note "Populate Indicators"

So for example if your wanted to access the first indicator of the first iteration of your 521 a field you could do something like this:

<?php
$myindicator = $marc->legacy['521'][0]['i1'];
?>

Now the question really is how to get those values in to field. I need to take a look and see if this what this would take.

benjamin.pauley’s picture

Status: Active » Fixed

[Smacks forehead] Of course. That works perfectly. I was forgetting about the field count. Thanks very much!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.