This forum is read-only - Please use our new Citavi Forum instead.
Dieses Forum dient nur zur Recherche - Bitte nutzen Sie das neue Citavi Forum für Ihre Fragen.

condition from a custom field in a parent reference

Ask questions about selecting and using citation styles.

condition from a custom field in a parent reference

Postby mnaah » 2016-10-26 17:12

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?

Thanks
mnaah
 

Re: condition from a custom field in a parent reference

Postby Sebastian Pabel » 2016-10-27 14:32

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
Sebastian

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.
Sebastian Pabel
Site Admin
 


Return to General Questions



cron