I'm looking to conditionally create a heading for portions of a table in a Survey123 report template. I've tried a million different things, but I'm stuck on the conditional, and if it is even possible. I have attached my template in its current form, as well as an example of what I'd like to be generating with the report template. Please give any help you can! And if it's not possible, then so be it.
Basically, all I need to do is have a heading created if any records of that heading's type exist in the data (in this case, animal type, i.e. bird, mammal, amphibian, etc.). On the other hand, I also need to NOT create the heading if there are no records of that heading's type. Then, it will iterate through the species in each type below said headings to create an organized list. It already does the species iterating correctly by animal type, I just need to figure out the headings!
Happy to explain anything, but the template and example should be pretty self-explanatory. Thank you all for your help!