Differences
This shows you the differences between two versions of the page.
233:mg_copy_subfield [2013/04/27 13:09] |
233:mg_copy_subfield [2021/12/29 16:21] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | **Using the 'Copy Subfield' | ||
+ | |||
+ | We've made a few changes to how 'Copy Subfield' | ||
+ | |||
+ | First, when selecting the 'Move subfield' | ||
+ | |||
+ | In addition to this fix, we've enhanced the capability of 'Copy Subfield' | ||
+ | |||
+ | __Copying only a portion of a subfield__ | ||
+ | |||
+ | First, its now possible to select a substring within a subfield for copying. There are two ways to do this: | ||
+ | - By specifying the offset and length within the subfield of the substring to be copied | ||
+ | - By specifying a pattern to match the beginning of the substring to be copied | ||
+ | |||
+ | To use this technique, proceed as follows: Enter the Tag and Subfield to Copy From on the 'Copy Subfield' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | If you are working with fairly fixed data, you can use the 'Start At' field to enter the position--within the subfield--to begin copying from, and then use the ' | ||
+ | |||
+ | On the other hand, a pattern can also be entered in the 'Start At' field. The case-sensitive and regular expression options available in standard patterns are also supported here. The ' | ||
+ | |||
+ | We recently found this new option useful to copy all of the document IDs from a URL field into a separate tag (which was then used to match/ | ||
+ | |||
+ | 856 40 $uhttp:// | ||
+ | |||
+ | By using the 'Copy Subfield' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | --we were able to generate a control number in each record that contained only the ' | ||
+ | |||
+ | 035 $aCX3477199999 | ||
+ | |||
+ | |||
+ | __Copying one subfield to many tags__ | ||
+ | |||
+ | Second, its now possible in 233 to copy a specified subfield to all occurrences of a target tag. For example, to copy the first 049$a in a record to a $z in all occurences of a 949 field, we would use the following 'Copy Subfield' | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Thus, if the source record contains | ||
+ | |||
+ | 049 $aMyCode | ||
+ | 949 $aData$bMoreData | ||
+ | 949 $aData$bMoreData | ||
+ | 949 $aData$bMoreData | ||
+ | |||
+ | the result of performing the above Copy Subfield task on this record would be | ||
+ | |||
+ | 049 $aMyCode | ||
+ | 949 $aData$bMoreData$zMyCode | ||
+ | 949 $aData$bMoreData$zMyCode | ||
+ | 949 $aData$bMoreData$zMyCode | ||
+ | |||
+ | __Copying many subfields to one tag__ | ||
+ | |||
+ | Third, it is also possible in 233 to copy each occurrences of a subfield in a tag that repeats, to a new subfield in a single target tag. For example, to copy each $a subfield in a 949 tag to a new $z in a 999 tag, we would use the following options: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Thus, if the source record contains | ||
+ | |||
+ | 949 $aData1 | ||
+ | 949 $aData2 | ||
+ | 949 $aData3 | ||
+ | |||
+ | the result of performing the above Copy Subfield task on this record would be | ||
+ | |||
+ | 949 $aData1 | ||
+ | 949 $aData2 | ||
+ | 949 $aData3 | ||
+ | 999 $zData1$zData2$zData3 | ||
+ | |||
+ | For this to work, its important that the overlay option be set to 'Add new subf'; if it is set to ' | ||
+ | |||
+ | 949 $aData1 | ||
+ | 949 $aData2 | ||
+ | 949 $aData3 | ||
+ | 999 $zData3 | ||
+ | |||
+ | One limitation to this second type of 'Copy Subfield' | ||
+ | |||
+ | 949 $aData1$aData2$aData3 | ||
+ | |||
+ | the result of performing the same Copy Subfield task on this record would be | ||
+ | |||
+ | 949 $aData1$aData2$aData3 | ||
+ | 999 $aData1 | ||
+ | | ||
+ | The program will only pick up the first $a in the source tag (even if you select the ' | ||
+ | |||
+ | 949 $aData1$aData2$aData3 | ||
+ | 999 $aData1$aData2$aData3 | ||
+ | |||
+ | Hopefully we can improve this behavior in a future version. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||