Format note summary for repeats in collect and enketo

Even though I've found another solution to create the summary, I just want to double check this:

I can use those in a calculation, but when putting directly in the label for a note they don't work. So would it be possible to use the instance function? I tried with a couple of variations, but all gave errors. For example instance('data')/plotinfo[position() = 1]/datagrp/plotname.

As for the workflow and the need of a summary, it's just to have a single page where you can see the information entered and can double check some of the information.

From Generate a PDF for saving/printing inside the form I found the way to create the final summary by creating part of the summary in each repeat and then join them after the repeat. In the new form I create a text summary to show in the note and a html summary to create the pdf, I will have to check if I can create a single summary that I can use in both the note and for the PDF.

Well, add me as a complainer, but because I will probably use only Collect, I'll be able to live with formatting it for Collect only. If I need to use Enketo I'll use a relevant to check if the deviceid starts with collect or not.

I didn't test on an older version of Central, I made this form last week to demo something for a friend and then tested with an account on Kobo, where it worked. When I tested on Central it gave me the error. I modified it using you suggestions, and now that part works on both Central and Kobo (but it seems Kobo Collect doesn't print pdfs yet).

New version of the form
Hydrophonic Control Sheet.xlsx (578.6 KB)