I have two photo submission questions in my Survey123 and after republishing the survey today, the constraints do not work and are only allowing ONE photo per question. The intended amount is 4 for the first photo question and 2 for the second photo question. The constraints are set in the constraints column as follows:
count-selected(${photo_signinsheet})<5
count-selected(${photo})<3
However, this morning I just made an update to the survey (to a different field/question altogether) and published the survey, and the photo constraints are no longer working. Is there a bug or issue with the constraints? If I take out the constraints, it allows multiple photos again, but I would like to set a limit.
What version of survey123 connect and field app?
Try updating to the latest of both and republishing. Most generic issues fixed by being on latest release.
Otherwise can you please share the xlsform?
Hi @ChristopherCounsell you may be right about the version issue. I am not using field app, but on the downloads page I can only download version 3.20.63, which I already have. On the Survey123 updates page, the most recent update is 3.20.65.
How can I make sure the connect version is current? I don't recall ever updating my Connect version in the past.
edit- I saw the analysis spreadsheet upon publishing and my XLS template was not up to date. I updated the template, but the issue still persists. This seems like a bug!
Pro Tip: If you install Connect/Field App through the Microsoft store, it auto updates.
Thanks! I'm not sure if that's where I've downloaded since the beginning, but I just did it and it put me at 3.20.63 still. Either way I have never had to update my Survey123 Connect app... so maybe it's been automatically doing so each time
Sorry, should have confirmed that for you. 3.20.63 is the current version.
But, installing via the MS Store means you will automatically get all new releases and not need to worry about being out of data in the future.
you can use this way is work
type | name | label | hint | appearance | calculation | constraint | constraint_message | bind::esri:fieldType | bind::esri:fieldAlias | body::esri:style |
image | attach_pictuer | Attach Picture | Use for mobile photoes taken. | multiline | Media | method=camera,browse | ||||
calculate | ann1 | calc_ann1 | count-selected(${attach_pictuer}) | count-selected(${attach_pictuer})<6 | The Number of photos must be less then six. | null |
Hi @MustafaAlkazaly thank you for the suggestion. I will try this workaround.