I have a problem that I can's seem to work around in Survey123 Connect for ArcGIS.
I'm creating a pipeline inspection tool. First, the user is prompted to put in some general text and integer fields, giving information about the inspection itself. After that, the different testing points and inspection faults can be put in by using a repeat.
The user first has to select the type of point he's going to add (this is called an "Event" in my survey), and can then fill in the relevant fields, for that type of repeat. Let's say there are 4 kind of events a user can select, that all make certain fields within the repeat visible or invisible (this is a select_one drop down list):
1. Survey start point coordinates
2. Potential test point
3. All other event types ...
4. Survey end point coordinates
I get this part to work fine. However... when the user starts inputting events into the repeat, there should ideally be a few criteria to be met:
Since there is (i think?) no full proof way to get the index-number of the current repeat, I'm trying to work around it by adding calculated counters outside of the repeat, that calculate if each one of the event types have been used inside of the repeat (0 if it hasn't been used, 1 if it has already been used).
Now i can apply a choice_filter to my drop down, and pull the choices that i need into the select_one and display them.
Problems:
Possible solution and it's problem:
A way to work around this problem, is to just ask for the values that are needed for "Survey Start point coordinates", "Survey End point coordinates" and the first "Potential Test point" outside of the repeat (since they are only needed once and in a particular part of the survey). That also keeps things much simpler configure inside of the repeat.
However, I don't want to separate these points from the rest of the data, table wise. I will eventually want to query trough resulting testing points, and I will need all events in 1 table, not 2 tables.
Any thoughts would be greatly appreciated.
Let me know if i didn't clarify enough.
Yannick
Solved! Go to Solution.
Hi Yannick,
It is possible to generate an internal count by having a function with count() inside the repeat refer to a question that will always be filled out in the repeat. That being said, for a more complex validation like you have, it may also be appropriate to consider a custom JavaScript function, which is a feature currently in beta
Hi Yannick,
It is possible to generate an internal count by having a function with count() inside the repeat refer to a question that will always be filled out in the repeat. That being said, for a more complex validation like you have, it may also be appropriate to consider a custom JavaScript function, which is a feature currently in beta
Hello James
Thank you for your answer. It seems that to solve this specific issue, i would have to look into a solution involving a custom JS Function. Because I did not have sufficient time for this project to explore it, i went with the workaround solution:
to just ask for the values that are needed for "Survey Start point coordinates", "Survey End point coordinates" and the first "Potential Test point" outside of the repeat (since they are only needed once and in a particular part of the survey)
I will definitely try JS as an alternative solution, whenever i have some time for the project again.
Sincerely
Yannick