Solved! Go to Solution.
Hi Susan,
Are the other surveys collected by different users on different devices at different time that you want to check? If so, the only place you can query for this information is against the feature service once the records have been sent. There is no way from Survey123 to query against the feature service for this information out of the box from within the survey form once it is opened.
Using JavaScript functions however, you may be able to achieve this by writing your own custom JS function. You can find out more about this beta feature here.
Regards,
Phil.
Hi Susan,
Are the other surveys collected by different users on different devices at different time that you want to check? If so, the only place you can query for this information is against the feature service once the records have been sent. There is no way from Survey123 to query against the feature service for this information out of the box from within the survey form once it is opened.
Using JavaScript functions however, you may be able to achieve this by writing your own custom JS function. You can find out more about this beta feature here.
Regards,
Phil.
Hello Philip,
Yes surveys are collected by different users on different devices at different time.
Thanks for the reply Philip!
Once they all sync you could use an Arcade expression to check in Collector.
I do this to make sure they did all 3 lines. I really wished it worked offline but for now 123 must sync up for Collector to see it.
Arcade in a Collector popup (I make it red text in the pop up so that it gives a red error or is just blank)
What it does is query another layer in the map, then looks to see if there is a Line 1, 2, and 3 for this plot.
if ($feature.EvalStatus == "Eval") {
var sql = "PlotKey = '" + $feature.PlotKey + "'";
var tbl = Filter(FeatureSetByName($map,"GAP"), sql);
var txt = ''
for (var f in OrderBy(tbl,"LineNumber")) {
txt = txt + f.LineNumber + ' '
}
txt = Left(txt,Count(txt)-1)
if (txt != '1 2 3') {
return "\n----Gap Line Number Issue! Found: " + txt
}
else {
return ''
}
}
else {
return ''
}
Hope it helps
Hi Phil:
You mention that this isn't possible if the users are on different devices, which makes sense, but is it possible to prevent duplicate entries over a specific time window by *one* user on a single device?
We're using Survey123 to record the loading of road salt into salt-spreading trucks. Since it takes the trucks a minimum of about 30 minutes to leave the salt station, spread their salt, and come back, I'd like to prevent the same truck ID from being recorded more than once in 30 minutes. There is only one Survey123 user per salt station, so I only need to check against surveys they've submitted, not the entire dataset.