PDF Template with linkMultiple field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Firyo
    Senior Member
    • Jun 2022
    • 134

    PDF Template with linkMultiple field

    Hi there,

    I'm currently stuck trying to display a "linkMultiple" field in a PDF Template.

    I have the entity "Product" that have a linkMultiple field with "ProductCategory" (that also have a linkMultiple pointed towards "Product", which results in a manyToMany relation).
    What I want is the get the name of first category linked to my product.

    The problem is that I can't retrieve any name of id from this relation in the PDF template.

    Following what is written in the docs here :


    Click image for larger version

Name:	image.png
Views:	308
Size:	70.7 KB
ID:	92066Click image for larger version

Name:	image.png
Views:	243
Size:	55.9 KB
ID:	92067​​


    I tried this but wasn't able to get the name of the first category linked to my product.

    Is there any way to display what I want in a PDF template ?
  • rabii
    Active Community Member
    • Jun 2016
    • 1250

    #2
    if you have set up the relationship as ManyToMany then you won't be able to access it using PDF hence the data will be stored in a middle table.
    Rabii
    Web Dev

    Comment

    • Firyo
      Senior Member
      • Jun 2022
      • 134

      #3
      Originally posted by rabii
      if you have set up the relationship as ManyToMany then you won't be able to access it using PDF hence the data will be stored in a middle table.
      Thanks for your answer,
      I found a workarround for my particular case.

      Comment

      Working...