Hi,
Making myself a little nuts over here.
I have created a PDF template that uses a Start-End to loop thru a referenced list.
It works ok.
But the formatting of the pdf is a little lacking. So, I wanted to identify the 3rd item in the list and add an image to that block - this would act as a header for the 2nd page of the pdf. I can control the spacing and I know that the 3rd item will be on the top of the 2nd page.
But I canโt find a way to grab the index # of the 3rd list item in order to add the conditional statement.
Below is the code snippet. Can anyone offer a solution?
"<<If: COUNT([Related Next of Kins Active]) >0>>
<<Start: [Related Next of Kins Active]>>
My Signature
<<[Signature Image]>>
<<[First Name]>> <<[Last Name]>>, <<[Relationship]>> <<[Entry Date]>>
<>
<>
<>
"
Thanks.
Penny
Solved! Go to Solution.
So, update.
I tried Marcโs suggestion, โSELECT( [Relatedโฆ][key] , [status] = โActiveโ )โ but it failed to find the key - maybe because the virtual column is calling a slice.
But I did find a solution to the issue in the original solution -
it seems the, โ<<If: [AdditionNextofKinId] = INDEX( [CR#].[Related Next of Kins Active] , 4 )>>โ wigs out if there are only 3 items in the list.
It then formats all items in the template as if they are item 4 (and its related spacing/copy).
So, I added a couple of <> statements:
<<If: COUNT([Related Next of Kins Active]) < 4>> then display regular <> / <> layout
And also
<<If: COUNT([Related Next of Kins Active]) > 3>> then use
โ<<Start: [Related Next of Kins Active]>>
<<If: [AdditionNextofKinId] = INDEX( [CR#].[Related Next of Kins Active] , 4 )>>โ layout.
This seems to work.
User | Count |
---|---|
25 | |
25 | |
25 | |
23 | |
16 |