Display character count or warn of exceeding limit when editing features?

544
7
06-29-2022 01:56 PM
SFM_TravisBott
Occasional Contributor III

Is it possible to either a) display the word count or b) highlight in some way when a user exceeds the word count when submitting a survey through a browser when editing an existing feature/survey and without adding a note and relevant field for each text field?

This thread is helpful but it's now three years old, and I would like to know if there is any new intel that I'm missing. 

In my case, my survey is accessed via a web form, and is always used to edit a related table of an existing feature service. As such, the character counter does not display. The workaround of adding a relevant field and note field for each would work but my survey has dozens of long-form questions, and would love to avoid having to created several dozen additional as a workaround. 

Are there any updates to this workflow since the above thread was posted three years ago?

7 Replies
wayfaringrob
Frequent Contributor

I'd also be curious - thanks for posting!

0 Kudos
jcarlson
MVP Esteemed Contributor

This is possible by making use of the constraint column. Simply put in a statement like this:

string-length(.)<50

Then use the constraint-message column to show

Entries must be less than 50 characters.  

 Users exceeding the constraint will see the message.

jcarlson_0-1656599306511.png

 

- Josh Carlson
Kendall County GIS
0 Kudos
wayfaringrob
Frequent Contributor

That workaround is referenced in the other thread - thank you. The concern is with why the counter that appears for new features automatically isn't appearing on surveys that edit existing data. The OP mentions that the workaround is undesirable.

0 Kudos
jcarlson
MVP Esteemed Contributor

I'm sorry, I should have read the entire thread, I'd have seen that. Well in any case, that method still addresses point B of the original question, in that it highlights questions for the end user without requiring the addition of notes fields.

It might be possible to have a single notes field validate the character counts on multiple other questions using a series of coalesce statements, but this is likely to be more complicated that just using constraints.

What's the use case here where a related table is being edited and possibly exceeding the original word count, instead of simply adding new entries?

- Josh Carlson
Kendall County GIS
0 Kudos
wayfaringrob
Frequent Contributor

In my case, I'm using a survey form with a group of field workers to update an existing dataset.

0 Kudos
SFM_TravisBott
Occasional Contributor III

Our use case is that we have several different surveys to track and document months-long processes for jurisdictions that we serve. So we have a single jurisdiction dataset for geometry and then several 1:1 related tables for their respective surveys. This allows staff to to launch their tracking forms from a URL parameter in a dashboard. 

0 Kudos
jcarlson
MVP Esteemed Contributor

That makes sense. Well, I don't see anything recent in the Survey123 Ideas space, so you may want to post something there like "display remaining character count when editing existing data". Having a built-in solution would be ideal.

Barring that, you're probably just stuck with the workarounds from 3 years ago. But even something as tedious as adding notes fields to your XLS form is a one-time thing. Odds are you could get that method up before the week is over, but waiting for a "real" solution to this problem could take considerably longer.

- Josh Carlson
Kendall County GIS
0 Kudos