Compile Replace vs Custom Meta-Data

Working on a technical document that makes strong use of particular “fields” throughout the entirety of the document.

Initially, I’d setup custom meta-data to hold this information. At compile time I expected that all of the codes would be replace with the values held in the meta-data. Unfortunately, it appears the meta-data needs to be defined for each template used in the overall project. Since the document in whole is based off of a multitude of templates restating the custom meta-data for each new use of a template become impractical. (Unless there’s a way to copy custom meta-data from one template to the next???)

Alternatively, I found the Replace feature in the Compile settings. Here, I could define each of these “Field Labels” in the text (similar to custom meta-data) and have the fields updated with the replacement text at compile time. For whatever reason, this is not working either?? Used the label: !CONSULTANT_NAME in the text with the replace value of ‘Ron Kochanowski’ with no change occurring in the output.

I’m at a loss, but am sure that there must be a way to accomplish this without as much of a headache as what it’s caused me so far.

Thanks for any assistance!

Ron

As you note, custom meta-data is, like labels and keywords, data you apply to specific binder items. There are no global keywords, no global meta-data values from which to pull from. It is however possible to pull meta-data (of any sort) from one item into another. For example you can type in <$title> and have it print the title from another item’s name from the binder. The trick is to select the entire placeholder, like <$custom:consultant_name>, and then create a Scrivener Link from that text to the target document. Now when you compile that, it will print the meta-data from the target item, not the one you typed it into.

That may work for what you need to do, but if not, the Replacements should be a good way of doing what you want, and they should be working given the way you describe it. There must be some condition of settings getting in the way. I’d try something very simple in a blank test project, get that working, and then apply that technique to the larger project and see if it carries over. If it isn’t working with a simple text, then let me know precisely which settings and checkboxes you are using.