Hi All,
I'm trying to input a constraint on a survey form with text questions of varying field length. Basically, I want the form to throw up a message whenever the user enters a note that exceeds a certain character limit. I've managed to make this work for smaller text fields with the following line:
string-length(string(${notes43}))<256
However, when I use a similar line (outlined below) for large text boxes that can hold 1000 characters, I don't get the constraint message at all when the limit is exceeded:
string-length(string(${notes43}))<1001
Anyone know where I'm going wrong here?
[Edit]: The text fields are configured with a multiline appearance, if that matters at all.
Solved! Go to Solution.
Did you set a longer field length in bind::esri:fieldLength column? Just making sure.
No need to have string() in there. I would also add a space between < and 1001 as it can confuse html at times.
So like this string-length(${notes43}) < 1001
Just a guess.
Did you set a longer field length in bind::esri:fieldLength column? Just making sure.
No need to have string() in there. I would also add a space between < and 1001 as it can confuse html at times.
So like this string-length(${notes43}) < 1001
Just a guess.
Ooo interesting note on the field length. My original line worked on the smaller text field which did NOT have a field length set in the form, but it didn't work on the the larger text fields that did have a set field length of 1000. Not sure why that is, but it does seem related.
Regardless, your refined line did indeed work on the larger fields. Thanks so much for your help!