I am designing a form that picks up a point during a field survey and, for each repeat, counts the number of points collected. I then use that count to help label the point. The crew would return to the hotel, 'Choose Send Now'. When they return to site, and start up the form, I would like the form to continue from the previous days count. ex: If 3 points were chosen the previous day, the count would begin at 4.
Does anyone know how to accomplish this?
See Below...
type | name | label | hint | guidance_hint | appearance | required | required_message | readonly | default | calculation | constraint | constraint_message | relevant | choice_filter | repeat_count | media::audio | media::image | bind::type | bind::esri:fieldType | bind::esri:fieldLength | bind::esri:fieldAlias | body::esri:style | bind::esri:parameters | parameters | body::accept | body::esri:visible | body::esri:inputMask | label::language (xx) | hint::language (xx) | guidance_hint::language (xx) | required_message::language (xx) | body::accuracyThreshold | bind::esri:warning | bind::esri:warning_message | bind::saveIncomplete |
select_one IPADNo | IPADNo | IPAD No | minimal | esriFieldTypeString | 4 | ||||||||||||||||||||||||||||||
begin repeat | GetSampleLocation | CAPTURE SUB SURFACE SAMPLE DATA | field-list | ||||||||||||||||||||||||||||||||
geopoint | SampleCoordinate | Capture Sample Location | minimal | esriFieldTypePointZ | |||||||||||||||||||||||||||||||
integer | CountSamples | Count Samples | count (${GetSampleLocation}) | esriFieldTypeInteger | |||||||||||||||||||||||||||||||
text | SI_Name | Sample Number | minimal | if(${CountSamples}< 10, "S" + ${IPADNo} + "000" + ${CountSamples}, "S" + ${IPADNo} + "00" + ${CountSamples}) | esriFieldTypeString | 8 | |||||||||||||||||||||||||||||
end repeat | CAPTURE SUB SURFACE SAMPLE DATA |
Solved! Go to Solution.
I tested out your form and the count calculation is continuing from the last count. I included a GIF of what I'm seeing when I have a record that has two previously existing repeats. Are you seeing the previous day's repeats when you open the record from the inbox?
Hi @AKorsos,
If you add "query" to the bind::esri:parameters column for the begin repeat row, the previously submitted repeat records will be viewable when the crew accesses the survey record from the inbox. The CountSamples calculation will then be based on all the repeat records that have been submitted for that form instead of just the records added since the last time the survey was submitted.
Also see the Repeats section in the Prepare for existing survey data section of the documentation for more info.
-Barbara
Hi Barbara
Thank you much for the tip. I am new to the ESRI coding thing.
I added 'query' to the bind::esri:parameters column for the begin repeat row, and in options I enabled the Inbox... however it doesn't appear to work. I should note as well that when I view the inbox after enter a simulated 1 day collection, no records appear after I refresh. Clearly I am missing something?
Thanks again
A
@AKorsos No problem, are you not seeing any survey records at all in the inbox? Or is it just the repeat records that aren't showing up?
If you aren't seeing any survey records at all, you could check to see if the sent box is enabled too. If the surveys are in your sent box then they won't show up in your inbox.
If it's just the repeat records that aren't visible in the inbox, would you be able to share your XLSForm so we can take a more detailed look?
Thanks,
-Barbara
Thanks for the XLSForm, on initial read through it looks like everything is configured correctly in the form. If you look at the survey details page in the field app is there a sent box along with the inbox?
Hi Barbara
Yes I have what you show. A Collect, Inbox, and a Sent showing 1 sent
Thanks
Andreas
In the field app a record will only show up in one of the 'boxes' at a time, so if you go into the sent box and press 'Empty' and then refresh the inbox, the record should appear in the inbox.
It's also possible to disable the sent box in the settings in Connect if you only want to access records from the inbox.
Hi Barbara
I did both. Left the Sent Box and then turned it off. I was able to see the items in the inbox after a refresh... unfortunately the count still starts as 1 again after restarting the survey rather than recognize the count in the inbox. It is almost as if the 'query' is not looking at the inbox. Did you use the form that I provided to see if it worked on your end?
Thanks
Andreas
I tested out your form and the count calculation is continuing from the last count. I included a GIF of what I'm seeing when I have a record that has two previously existing repeats. Are you seeing the previous day's repeats when you open the record from the inbox?