I need to add $$c Gift to local extension MARC 597 and reorder the subfields. How can I do this with a normalization (norm) rule?
Answer
Subfields can be added and reordered using norm rules in Alma. The following norm rule actions can be used to in the following order:
- addSubField
- moveSubfieldsToEndOfField
To add $$c Gift to local extension MARC 597 and reorder the subfields as $$c $$a $$d $$9, use one of the following rules:
- Option 1: Not Exists "597.c.Gift"
- Option 2: exists "597" AND not exists "597.c.Gift"
- Option 3: exists "597" with "if" statements in the actions
Option 1: Not Exists "597.c.Gift"
rule "597|c|Gift"
when
not exists "597.c.Gift"
then
addSubfield "597.c.Gift"
moveSubfieldsToEndOfField "597" "c,a,d,9"
end
Option 2: exists "597" AND not exists "597.c.Gift"
rule "597|c|Gift"
when
exists "597" AND not exists "597.c.Gift"
then
addSubfield "597.c.Gift"
moveSubfieldsToEndOfField "597" "c,a,d,9"
end
Option 3: exists "597" with "if" statements in the actions:
rule "597|c|Gift"
when
exists "597"
then
addSubfield "597.c.Gift" if(not exists "597.c.Gift")
moveSubfieldsToEndOfField "597" "c,a,d,9"
end