Hi all,
I am looking for a solution to this issue. I have a survey that combines three prior surveys. In mainly the monitoring portion of the survey, I have implemented the pulldata feature for some of my data fields. I ideally want to pair this with QR codes that should eliminate the need for the favorites feature; however some field staff may not choose to use the QR codes. I need to retain the ability to use the pulldata feature or have manual entry of data. With this being said, when I try to edit a submitted record or copy favorites to a new survey, some of the pulldata fields that have dependent questions are not cleared when they are submitted. This is resulting in messy data, by having the no longer relevant dependent fields, still being present (although not visible to the user in the form). For example, if I submit that a sample is a filter in the first initial survey, the pore size, smith-root backpack serial number, and the smith-root sample ID fields should all be submitted. This currently works well. However, if I were to copy this survey's info to a new survey and change the sample to centrifuge (no dependent questions), the pore size, smith-root backpack serial number, and the smith root sample ID fields are all retained and submitted (without the user seeing these responses), when it is not relevant anymore. I've attached my current XLSX form and thank you in advance.
Additionally, I am not able to see my pulldata field submissions in the sent box. These fields are blank and need to be visible in case editing is required by field staff.
Are all the pulldata blank when accessing from the inbox or just certain ones? I see you have a handful set to null which would not submit data to the feature and therefore would not be available from the inbox, and a handful of others are calculate type questions which are hidden in the form. And you have a lot of "visible" dependencies, those won't show unless the dependencies are met.
They are retaining values cause the are not visible, but still relevant.
body::esri:visible = If made not visible will retain answer.
relevant = wont retain answers if made not relevant
Hi @Neal_t_k,
Thanks for responding so quickly, I currently do not have my inbox enabled, however when looking from the sent box, I cannot see the sample type field or the sample preservation field submitted answers, they are blank. All other pulldata fields seem to be visible in viewing the sent submission in the app. When looking at the submitted data online, it seems all is well in terms of all fields being submitted. As for retaining values, I am a little lost on your recommendations. Are you suggesting removing the nulls and switching the body::esri:visible expressions to relevancies?
As far as the null and visible expressions go, you will have to examine your workflow and determine exactly what you want submitted and retained. If it is null it won't be submitted, so if you want to see those answer in the data later you would have to remove the nulls. And as for the relevant vs visible there are pros and cons to both and it depends what you want for the end results. Here is a recent post on the topic that references it: https://community.esri.com/t5/arcgis-survey123-questions/relevance-condition-deletes-previous-respon...
I can't see anything obvious that would cause those to questions to be blank, especially if you say they are in the data correctly. The only thing I am seeing and I don't know if it is what is causing it, but you calculate the sampinfo_type_name first and then populate the sampinfo_type with that answer. You can probably skip the calculate question and put that calculation directly in the calculation for sampinfo_type. Same for sampinfo_prestype. Since those two are not showing up, before you change anything, Change your questions type from "calculate" to "note" so you can visually verify that the pulldatas are working correctly. If they aren't it may explain why the sample type is not showing up.
One other observation, I see you have this "${projecttype}='Monitoring' or ${projecttype}='Sequencing' or ${projecttype}='Voucher_Specimen'" in quite a few of the visible expressions, from what I can see you only have 3 choices for projecttype, which would mean you want to see that question no matter what and can delete that expression, cause it is saying you want to see that question for each of the project types.
Hi @Neal_t_k ,
Ok so I've cleaned up my XLSX a bit. I've removed the calculate fields as suggested and moving all fields with a dependent question (sample type, sample preservation type, Target species ID) to the relevant field. This seemed to fix the issue of retaining the irrelevant info after the submitted answer was changed. However, I am still having the issue of the answer for both the sample type and sample preservation type be blank in the sent box when not using an ID associated with the pulldata CSV (assuming this is happening due to the pulldata function calculationmode=always). When using an ID associated with the pulldata CSV, the sent box submission for these two fields defaults back to the original pulldata CSV value, instead of recording the changed answer. Is there a way to view what is actually submitted in the Sent box? Is this an issue with the calculation mode or is this just a bug when using the pulldata feature? I've attached by updated XLSX form. Thank you again for all your help, I am still new to Survey123 and your assistance has been very helpful!
Ah yes, that would do it. Your pulldata is recalculating when you open it and since there is no matching ID it returns blank overwriting the manual entry. You may be able to change the calculation mode to get the intended function, I might try whenEmpty or auto...
@Neal_t_k After testing out calculationMode=whenEmpty and calculationMode=auto recommendation, I didn't have any luck visibly seeing these submissions entries in the sent box for the sample type or the sample preservation type for non pulldata CSV IDs. However, as discussed before the data is still being submitted on the back-end fine. Do you have any other further recommendations that I can try so that field staff can see what they had submitted?
Were these the same blanks as when we started this conversation? My only other thought is going back to the helper fields for the pulldata and then in the question set the calculation to the helper field and set the calculationMode to whenEmpty. But that appears to be how you had it set at the beginning...
Where are they accessing to see what they have submitted, have you considered a Dashboard/ExB to let them access the submitted data outside of Survey123 if they are accessing from online?