Announcement

Collapse
No announcement yet.

PDF template in relationships

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PDF template in relationships

    Hello

    I have created two entities, school class and student, with a one-to-many relationship between them.
    The PDF file should contain all the students in a class.
    You probably use
    {{#if value}}
    {{/if}}
    But how is this supposed to work, the criterion is in the entity school class and the data in the many data records of the entity student.

    Can someone show me an example.
    Thank you.
    Peter​

  • #2
    You can fetch a relationship value in the same way as a value of the current entity. The only thing is, that the relationship values are not provided by the drop-down with the field codes.
    So if you want to fetch the relationship value, you will have to look into the relationship, like so:

    {{#if student.school}}
    {{/if}}

    where student.scholl is supposed to be the relationship.

    This would fetch the student value from entity school. I don`t know, how you configured the relationship, but I think you get it.
    If it does not work with #if, use #ifEqual and from my experience it has been necessary to put the placeholder code in HTML comments:

    <!-- {{#if value}} -->
    <!-- {{/if}} -->​​

    Comment


    • #3
      Vielen Dank.

      Comment

      Working...
      X