Page 1 of 1

condition from a custom field in a parent reference

PostPosted: 2016-10-26 17:12
by mnaah
Hi there,

In my style, when a work is co-published by 2 presses, the details of both have to be given like this: Place1: Publisher1; Place2: Publisher2, year.

I am using a custom field (3) to input the second press information and have modified the style to accommodate this for books. There are, however, some edited books and collected works that also have dual publishers. It is possible to input the information into custom field 3 for both the parent and child reference, and this works. However, is there a way to create a conditional template for a contribution to an edited work that triggers when custom field 3 in the parent reference is not blank?

I think it should go something like this within the code:
Code: Select all
citation != null &&
            citation.Reference != null &&
            citation.Reference.ParentReference != null &&
            citation.Reference.ParentReference.???? != null;

But I am not sure what should go in the final line in place of the ????

Any help?


Re: condition from a custom field in a parent reference

PostPosted: 2016-10-27 14:32
by Sebastian Pabel
Hi, mnaah,

there's a script available in our FAQ (German only). You need to change line 24 in order to make it use custom field 3:

Code: Select all
var CustomField3 = citation.Reference.ParentReference.CustomField3;

Best regards

Did we answer your question completely? If so, please click the green check mark in the upper-right corner of this post. This helps other users find the solution to their questions.