Select to view content in your preferred language

Duplicate survey data output

1209
5
Jump to solution
08-25-2023 01:47 PM
SeannaORegan
Emerging Contributor

Hello,

 

We are building a form to submit samples to a laboratory for analysis. There are various different sites that would need sampled per permit. For each of the sites, we are trying to default the sampling bottles required, frequency of collection, and analysis required. 

When the survey is submitted, the second site entered always duplicates the entries for the bottles, frequency, and analysis required. However, if you add a third site to the survey response, it doesn't duplicate. The site order doesn't matter, the second site always duplicates. 

We are not sure how to fix it if you could please help! 🙂

 

 

 

notegenerated_note_surveyDescription<p style="text-align:center;">Name</p><p style="text-align:center;">CHAIN OF CUSTODY</p>                               
notegenerated_note_form_submit_textSubmit                                     
notegenerated_note_form_footer<a target='_blank' style='color:#ffffff;' href='https://www.esri.com/products/survey123'>Powered by ArcGIS Survey123</a>                                 
notegenerated_note_prompt_submitted<p style="text-align:center;"><br></p><p style="text-align:center;"><img alt="undefined" src="data&colon;image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjQiIGhlaWdodD0iNjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiMzMTg3MkUiIGN4PSIzMiIgY3k9IjMyIiByPSIzMiIvPjxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0yMi42NjEgMzAuMjQ2bDUuMTgyIDQuOTg3TDQxLjU1MiAyMiA0NSAyNS40NjEgMjcuNzQ3IDQyIDE5IDMzLjQ5OHoiLz48L2c+PC9zdmc+"></p><p style="text-align:center;"><br></p><p style="text-align:center;"><strong style="font-size:16px;"><p style="text-align:center;">Thank you.</p><p style="text-align:center;">Your response was submitted successfully.</p></strong></p>          
textsampled_bySampled by<p>(your first and last name)</p> yesThis is a required question            255                   
textclient_nameClient Name   yesThis is a required question Client          255                   
textproject_numberProject Number      Permit Number          255                   
begin group                                       
begin repeatSitesSelect Site                                     
select_one list_site_codeselect_site Pick one:                                    
textsample_descriptionSample Description   yes      ${select_site}='Other'                          
geopointcollection_pointCollection Point          ${select_site}                          
imagephotograph_sitePhotograph site          ${select_site}        method=cameramax-size=10                
dateTimedatetime_sampledDate/Time Sampled          ${select_site}     esriFieldTypeDouble255                   
select_one list_regulatoryis_sample_regulatoryIs sample collected for regulatory reporting purposes?         ${select_site}                          
select_one list_site_is_site_flowingis_site_flowingIs it flowing >1 gpm?  minimal       ${select_site}      255                   
decimalfield_phField pH          ${is_site_flowing}='Yes'                          
decimalfield_conductivityField conductivity          ${is_site_flowing}='Yes'                          
select_one list_site_is_flow_calculatedis_flow_calculatedIs the flow calculated?  minimal       ${is_site_flowing}='Yes'      255                   
integerestimated_flow_rate_gpmEstimated flow (gpm)          ${is_flow_calculated}='No'                          
decimalstream_length_ftStream depth (ft)          ${is_flow_calculated}='Yes'    esriFieldTypeDouble                    
integerstream_width_ftStream width (ft)          ${is_flow_calculated}='Yes'    esriFieldTypeDouble                    
decimalstream_velocity_ftsecStream velocity (ft/sec)          ${is_flow_calculated}='Yes'    esriFieldTypeDouble                    
decimalflow_rate_gpmFlow rate (gpm)       round(448*(${stream_length_ft} div 2*${stream_width_ft})*${stream_velocity_ftsec}, 0)  ${is_flow_calculated}='Yes'    esriFieldTypeDouble                    
select_one list_frequencyfrequency_DSTF04Sample Collection Frequency:      Quarterly   ${select_site}='DSTF04' 0                        
select_one list_frequencyfrequency_USTF04Sample Collection Frequency:      Quarterly   ${select_site}='USTF04' 0                        
select_multiple list_bottlesbottles_DSTF04Bottles: UFUA = unfiltered, unacidified : UFA = unfiltered acidified : FA = filtered acidified    1L_UFUA,120mL_HNO3_UFA  ${select_site}='DSTF04' 0                        
select_multiple list_bottlesbottles_USTF04Bottles: UFUA = unfiltered, unacidified : UFA = unfiltered acidified : FA = filtered acidified    1L_UFUA,120mL_HNO3_UFA  ${select_site}='USTF04' 0                        
select_multiple list_analysisAnalysis_DSTF04Analysis      Flow,Cond,pH,TSS,Alkalinity,Sulfates,Hot_Acidity,Iron,Manganese,Aluminum,TDS ${select_site}='DSTF04' 0                        
select_multiple list_analysisAnalysis_USTF04Analysis      Flow,Cond,pH,TSS,Alkalinity,Sulfates,Hot_Acidity,Iron,Manganese,Aluminum,TDS ${select_site}='USTF04' 0                        
end repeat                                       
textfield_76Special Instructions or Comments                                       
imagerelinquished_byRelinquished by<p>Please sign your name.</p>signatureyesThis is a required question                                
select_one list_site_sample_dropis_sample_dropIs there a person to receive the samples?  yes                                 
textsample_secureSample was dropped at secure location.Enter any other pertinent info about the samples' drop location.       ${is_sample_drop}="No"                          
dateTimedatetime_relinquishedDate/Time Relinquished   yes                                 
imagereceived_byReceived by<p>Please sign your name.</p>signature       ${is_sample_drop}="Yes"                          
Tags (3)
0 Kudos
1 Solution

Accepted Solutions
TylerGraham2
Frequent Contributor

I couldn't get the form to load or publish until I fixed labels, group names, inappropriate use of repeat count column and removed an extra "end group" at the bottom of the xlsx. I tested it in Connect and also as a published survey in Survey123 and it behaved as designed.  The only duplication I could see of the Frequency, Bottles, and Analysis fields is because you have default values set for each of those. That will cause the repeat to "duplicate" because it sets those as the defaults for each new repeat, but additional selections did not carry over between repeats.   

There were some invalid cell values in the xlsx (empty fields that it didn't like until you clicked and hit delete) and some incompatible "type" and "bind::esri:fieldType" settings.  I fixed most, your stream width still needs fixed since the type is "integer" and the esri field type is "double". For your relevant expressions I changed them from the ${field_name}="X" to the best practice selected(${field_name}, "x").  I attached the cleaned up version for you to test out.    

 

View solution in original post

0 Kudos
5 Replies
GregKeith
Frequent Contributor

Do you have an end group? I also give groups a name and label (even if just <b></b>), although not sure that's mandatory. Do you have any calculations or other stuff going on?

0 Kudos
SeannaORegan
Emerging Contributor

Yes will upload the xlsx form 🙂 

0 Kudos
TylerGraham2
Frequent Contributor

Would you be able to upload the xlsx for the form? It is hard to figure out where your formulas are supposed to be since the embedded table doesn't have any headers.  

I'm surprised you aren't getting an error in the survey since it looks like your "select_site" field has no label name for it.  

0 Kudos
SeannaORegan
Emerging Contributor

Hello, I have uploaded the xlsx in the reply above. I do get an error for not labeling the select_site but it doesn't seem to impact the actual survey and I can publish it.

 

Greatly appreciate any help you could give! 🙂

 

Thanks!

0 Kudos
TylerGraham2
Frequent Contributor

I couldn't get the form to load or publish until I fixed labels, group names, inappropriate use of repeat count column and removed an extra "end group" at the bottom of the xlsx. I tested it in Connect and also as a published survey in Survey123 and it behaved as designed.  The only duplication I could see of the Frequency, Bottles, and Analysis fields is because you have default values set for each of those. That will cause the repeat to "duplicate" because it sets those as the defaults for each new repeat, but additional selections did not carry over between repeats.   

There were some invalid cell values in the xlsx (empty fields that it didn't like until you clicked and hit delete) and some incompatible "type" and "bind::esri:fieldType" settings.  I fixed most, your stream width still needs fixed since the type is "integer" and the esri field type is "double". For your relevant expressions I changed them from the ${field_name}="X" to the best practice selected(${field_name}, "x").  I attached the cleaned up version for you to test out.    

 

0 Kudos