I would like to suggest an enhancement to EndNote’s output-style editor: support for conditional logic based on both the presence and the content of reference fields.
At present, EndNote styles can make some formatting decisions according to whether a field is populated, but they do not appear to provide a way to test the actual contents of a field or construct more general IF/ELSE rules.
A practical example arises when preparing reading lists or syllabi for students.
For a journal article, the conventional output may use the DOI:
https://doi.org/10.xxxx/example
However, for institutional users this is not necessarily the most useful link. A university library may provide a persistent authenticated link through a discovery service, EBSCO, EZproxy, ProQuest, or another provider.
For example, a reference might contain both:
DOI = 10.xxxx/example
and:
URL = https://research.ebsco.com/plink/...
Similarly, for a book there may be a DOI or publisher URL alongside an institutional discovery link such as:
https://discover.stellaruniversity.example/permalink/...
For a syllabus, I would like an output style to be able to express logic along the following lines:
IF Syllabus Link is populated
output Syllabus Link
ELSE IF URL contains "discover.stellaruniversity.example"
output URL
ELSE IF URL contains "research.ebsco.com"
output URL
ELSE IF DOI is populated
output "https://doi.org/" + DOI
ELSE
output URL
At present, a workaround is to create and manually populate an additional custom field containing whichever URL should be used in the syllabus. This works, but it duplicates information that EndNote may already hold and requires additional maintenance.
More generally, it would be very useful if the output-style editor supported a small set of conditional operators, for example:
- field exists / field is empty
- field equals value
- field contains text
- field starts with / ends with text
- AND / OR / NOT
- IF / ELSE IF / ELSE
- simple string concatenation or substitution
This need is not limited to library URLs. Conditional rules could also be useful for repository links, open-access versions, article numbers, identifiers, online-first publications, translated works, institutional databases, and other cases in which the appropriate output depends on metadata contained in the reference.
Ideally, this could be implemented either through an enhanced graphical style editor or through an optional advanced rule or macro syntax for users who need more control.
The existing EndNote style system is very powerful for conventional bibliographic formatting. Adding basic conditional logic would make it considerably more flexible without requiring users to alter or duplicate otherwise correct bibliographic metadata.