I am creating a form to assess tree measurements in the field. I have a JS function already in place that calculates the root of mean squares on the top 8 largest trees, sorted by their DBH. However, I need it to only run these calculations on two specific species of trees, and I'm not versed enough in Javascript to do so. I tried to use the relevant column but I realized this just hides the calculations on certain trees while still running the script.
The two species abbreviations (name: tree_species) are 'PISI' and 'TSHE'. All other species cannot be included in the calculations, otherwise it will skew results.
I have attached a script that a previous user on here helped me figure out, as well as the XLS form. If someone could give me some guidance, it would be very appreciated. I can't help but think it's an easy fix, but I have no experience with Javascript
Thanks,
Jess