Hi, all-
I'm working on transforming a set of data in OpenRefine to produce MARC bibliographic records in MarcEdit. One element I'm trying to include is a MARC 008 field with custom data for each record, such as year of publication - by default, MarcEdit supplies a generic 008. The 008 format MarcEdit expects uses backslashes to represent blank bytes (the default it supplies is s9999\\\\xx\\\\\\\\\\\\000\0\und\d, for example). I've gotten this to work just fine by escaping the backslashes. To keep better track of string length, I started with a string using pound signs:
grel:"sYEAR####xx#RUN############muund#d"
And then replaced the pound signs with escaped backslashes, while also filling in the data I want from other columns:
grel:value.replace("#","\\").replace("YEAR",cells["008 year"].value).replace("RUN",cells["008 runtime"].value)
Which gives me the custom 008 strings I'm looking for. My problem is that I'm trying to make this process repeatable by others, and when I try reproducing it with a new set of data by pasting the extracted JSON history into the "Apply..." dialog box, most of the steps related to producing this 008 disappear - they're gone entirely if I look at the newly-created history. I was thinking the presence of backslashes in the string might be at fault, but even the original step of creating the string with pound signs vanishes. Oddly, if I segregate the JSON having to do with the 008 and apply it as a separate, second step, it works. I'm wondering if I'm missing anything obvious that would make this work as a single JSON history, or if there are any common pitfalls when using a long JSON history to reproduce a transformation process.
I'll also note that there are ways to build this field from the MarcEdit side as an alternative solution, but they require more manual intervention; the hope is that staff can paste this history in and get to the end result with minimal steps. Thanks for any thoughts on this!
Ryan Wheeler