Retain Value from day to day (between Surveys)

1162
11
Jump to solution
03-23-2022 10:49 AM
AKorsos
New Contributor II

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...

typenamelabelhintguidance_hintappearancerequiredrequired_messagereadonlydefaultcalculationconstraintconstraint_messagerelevantchoice_filterrepeat_countmedia::audiomedia::imagebind::typebind::esri:fieldTypebind::esri:fieldLengthbind::esri:fieldAliasbody::esri:stylebind::esri:parametersparametersbody::acceptbody::esri:visiblebody::esri:inputMasklabel::language (xx)hint::language (xx)guidance_hint::language (xx)required_message::language (xx)body::accuracyThresholdbind::esri:warningbind::esri:warning_messagebind::saveIncomplete
select_one IPADNoIPADNoIPAD No  minimal             esriFieldTypeString4               
                                    
begin repeatGetSampleLocationCAPTURE SUB SURFACE SAMPLE DATA  field-list                              
                                    
geopointSampleCoordinateCapture Sample Location  minimal             esriFieldTypePointZ                
integerCountSamplesCount Samples       count (${GetSampleLocation})        esriFieldTypeInteger                
textSI_NameSample Number  minimal    if(${CountSamples}< 10, "S" + ${IPADNo} + "000" + ${CountSamples},  "S" + ${IPADNo} + "00" + ${CountSamples})        esriFieldTypeString8               
                                    
end repeat CAPTURE SUB SURFACE SAMPLE DATA                                 
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
BarbaraWebster1
Esri Regular Contributor

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? 

Untitled Project.gif

View solution in original post

0 Kudos
11 Replies
BarbaraWebster1
Esri Regular Contributor

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

0 Kudos
AKorsos
New Contributor II

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

BarbaraWebster1
Esri Regular Contributor

@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

AndreasKorsos
New Contributor II

Hi Barbara

I entered a 'days' collection in the App. Closed the app and then went back in as if it was the next day and nothing appeared in the Inbox...

Here is the sheet. I have hidden most of the questions so I could concentrate on this problem.

Andreas

Tags (2)
0 Kudos
BarbaraWebster1
Esri Regular Contributor

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?

BarbaraWebster1_1-1648158306859.png

 

 

0 Kudos
AndreasKorsos
New Contributor II

Hi Barbara

Yes I have what you show. A Collect, Inbox, and a Sent showing 1 sent

Thanks

Andreas

0 Kudos
BarbaraWebster1
Esri Regular Contributor

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. 

0 Kudos
AndreasKorsos
New Contributor II

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

0 Kudos
BarbaraWebster1
Esri Regular Contributor

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? 

Untitled Project.gif

0 Kudos