When setting a default answer for repeat question, default answer is not applied to first question.

3650
13
Jump to solution
05-21-2018 08:12 AM
JohnTruong
New Contributor III

I'm having problems getting my first question is repeat question to have a set default value. Currently, I have a question that asks if the user has invasive plants in their plot. If the user selects checks yes for a yes/no question a repeat question will appear that lists 16 common invasive plants. The user will be asked to check yes/no if a specific species is present in their plot. I would like to default of the species to no (not present) so the user can quickly scroll through the list to find the correct species, and manually check yes. I've put no into the column "default" for this question but the first question (question 1) in the series of 16 questions does not default to no, nothing is checked. Only questions 2-16 have no as defaults. I've tried this on my other sets of repeat questions and the same issue occurs, the first question is never set to the default value but ever question after the first in the series of questions will have default value set.

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi John,

Yes, the prism_counter is a calculation that is contributing to the issue I mentioned above.

View solution in original post

13 Replies
JamesTedrick
Esri Esteemed Contributor

Hi John,

Is there a calculation also in the repeat section?  There is a known issue with the combination of repeat_count and calculations affecting the default value for a question in a repeat.

0 Kudos
JohnTruong
New Contributor III

Hi James,

There are no calculations in the calculations column in the row that the repeat begins and ends, that is what you are asking? However, I do have relevance set as ${microplot_yn} = yes (this means when the user selects "yes" to take a picture at the microplot the repeat will appear). I also have repeat count set to 3.

There are a couple calculations in between Begin and End. I've attached a photo highlighting the repeat I'm having problems with.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi John,

Yes, the prism_counter is a calculation that is contributing to the issue I mentioned above.

JohnTruong
New Contributor III

Removed the prism_counter calculation and the default values were able to set for every question. Thank you James!

0 Kudos
EmilyResseger
New Contributor II

Has there been any movement on the known issue of the combination of repeat_count and calculations affecting the default value for a question in a repeat? I have a nested repeat in Version 3.0 and am trying to rely on a number of calculations and default values. The first repeat through is having issues with these not populating.

0 Kudos
JohnTruong
New Contributor III

Hi Emily,

I believe there still has not been an update. I noticed that this only

occurred on the first question within the repeat question. After you move

onto the next question the default answer begins to appear.

0 Kudos
JohnathanHasthorpe
Esri Regular Contributor

We have a fix for this on the EAC - please test out the latest release candidate builds here: https://earlyadopter.esri.com/project/home.html?cap=%7bE69EF91F-4574-4B98-882C-651F7B518EB7%7d 

0 Kudos
EmilyResseger
New Contributor II

I missed the opportunity to try this in 3.1.136 Field App and 3.1.113 Connect on the EAC, but did try it today with 3.1.158 Field App and 3.1.126 Connect on the EAC, which should have had the functionality rolled into it. Unless I am missing a setting it still doesn't work. I set defaults in XLSForm in Connect, loaded the survey into the app, and the first repeat does not have the defaults loaded. The second repeat has them.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Emily,

Could you share your form?  While this has been addressed for most situations with repeats, there are a couple of configurations which did not get fixed for 3.1.

0 Kudos