It is easy for users to accidentally submit a blank repeat. I am trying to create a note that warns users they've submitted a blank note. I have first created a hidden repeat count field, count(${sprinklers}) + 1. The count starts at 0, so I've added a plus 1. I've added this field to the label so users can see how many non-null notes they have total. Then I've taken the repeat field ${sprinklers} and made a relevant statement below that if the string length is zero and the sprinkler count is greater than 1, then show a note that says "You submitted a blank note". But I can't get it to behave because if they populate the first note then every new page after that will warn them there is a blank note before they even have the chance to add it in.
string-length(${sprinklers})=0 and ${sprinklernote_count}>1
Solved! Go to Solution.
You can likely use the position(..) formula
string-length(${sprinklers})=0 and ${sprinklernote_count}=position(..)
This should look at the current note and see if it is blank
I wonder if making the note question within the repeat required would be an acceptable solution for you.
Thanks Ismael, a response isn't required, that would be frustrating for users. I figured out I would deploy the count and then the user could see that the title says Note #1 but they can see in the pagination that they're on two? I'd rather build some warnings, but struggling with what I described in my initial post.
You can likely use the position(..) formula
string-length(${sprinklers})=0 and ${sprinklernote_count}=position(..)
This should look at the current note and see if it is blank
I really like when I get a win on a Friday afternoon! I'll hide the count and index of course, but that did the trick. Thank you!