I am trying to use a constraint to require a user to answer a question some of the time. If the user gives a minimum elevation question, I need them to answer the maximum elevation question. An AI chatbot says this is possible, but I am not so sure. I am not able to get Survey123 to point out the an empty question. Here is what I have tried:Any thoughts you have would be appreciated.
Or if you want it to still show but not be required, the required column can also take a calc. It has the drop down of yes but you can also add any statement that evals to true or false in there and it works.
What you want is the relevant field, not constraint. Put your expression in the relevant cell for max_elevation. I don't think your expression is what you want though. For one, string-length isn't a great way to measure numeric data types. A value of 235 would have a string-length of 3 when converted to a string. It's useful for things like making sure a zip code has at least 5 digits, but a zip code should be a string; you're not doing any math with it. ${min_elevation} > 0 should work.The constraint field limits the values that can be entered, i.e. a constraint of 1 - 10 prevents a user from entering a value of 23, but doesn't make the question conditionally required. In your case, I'd also add an expression in the constraint field making sure that ${max_elevation} >= ${min_elevation}.
@ZenMasterZeke and @DougBrowning thank you so much for helping me see this problem differently! I was very stuck on it. It's working perfectly now. 🎉Fixed XLS
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.