In line 63 of the form I have a constraint. My intent is for it to check previous plant entries and if there is a duplicate, return a message saying "hey you already added this." However I copied the formula from a different form and I think something is off, it hasn't worked so far and I can't tell why.
This is my code so I hopefully can help.
You need to add a once on line 63 like this
once(join(", ", ${Species}))
Line 64 also needs a once
once(count(${species}))
Try that
Hi Doug! I tried that and it didn't change the result, I am still allowed to enter the same plant multiple times.
mm can you post the species csv so i can test, you prob dont use unknown codes
Oh you have this outside the repeat, it needs to be inside. Move end repeat down below line 65
Both of those seemed like it would do the trick, but neither of them did it. I can still add Abies Balsamea to my heart's content.
Weird I have it working in 3 different forms. Post your species list csv so I can test.
I added the once and moved the end repeat and it is working just fine for me. Took out the XXXX to make it simpler (we use that for Unknown plants) Not sure where you are off.
See attached.
Also I suggest changing your plant list to have name as the USDA code and the label be this with 4 spaces in-between each.
USDA Code Scientific Name Common name
That way you store the codes in the data making downstream use way easier. Also it allows the crew to search by any part of the name they know. For example they know its a fir and can quickly narrow the list.
This is what we do
This looks like a wetland survey? Are these islands BLM by chance? We shared our forms to the MI people doing the same on their islands. We have a whole set of Wetland forms. I can share just reach out on PM.
Hope this all helps.
THANK YOU so much! Yes, it's wetlands, BLM islands, in Minnesota. I'd love to see their forms.