Repeating Groups that are not relevant still write to the tables

193
5
05-30-2019 06:06 AM
Highlighted
New Contributor II

Is this by design or a bug?  Here is an example that is causing some heartburn.  In a survey I have a repeating group that is conditionally required.  If the user doesn't need that section it is not shown.  However I am still seeing a record being inserted into the table.  If the repeating group is not relevant I wouldn't expect it to insert a record into the table.

To explain further here is our example.  The questions in the repeating group are related to how many plants were counted in the sample and how many plants were found in the sample that are affected.  i.e.  They count 500 plants and found 2 with the condition we are looking for.   We default the values of those questions to aid with user entry to 500 and 0 respectively.   When the record is inserted for the repeating group that is not relevant it inserts the defaults of 500 and 0.  Then, when I look at the data it makes it appear that they did the counts and found 0 affected plants.  

From my testing I am seeing this behavior in 3.3 and beta versions of 3.4.

Reply
0 Kudos
5 Replies
Highlighted
Esri Frequent Contributor

Hi Russell,

This is a known issue with loading default values into a question that is not relevant on load, applies to parent layer or repeats. In this case the default value is stored in that question and sent to the feature service. In your case, because the default values are inside the repeat it is creating the first repeat record to be able to populate it.

There is a currently a open support bug BUG-000097105 in our backlog for this issue but unfortunately it did not get fixed for 3.5.

Have you tried setting the repeat appearance to minimal, which should avoid the first record being created automatically?

Phil.

Reply
0 Kudos
Highlighted
New Contributor II

Thanks Phil.  I think if I move my default values to a calculation I can get the survey to do what I want. 

However, another related question. When I moved my values to the calculation  it does not write a record to the repeating group table.  But I have another repeating group that does not have any default values and it always writes a record to the repeating group table.  The record has no values besides the global keys and created/updated info but I'm curious why one is creating a record and the other isn't.  Are there other conditions that cause it to create a record?  I have both of the repeating groups set up in the same way.

FYI - The all "null" record I can workaround pretty easy (unlike when the defaults were being inserted) but if I could avoid having the record at all I would rather have that.

Thanks!

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Hi Russell,

There must be an expression (could be required, constraint, relevant, pulldata etc) in that repeat that is running when the form loads based on other values changing or being loaded. This is what creates the first record.

Have you tried setting that repeat to minimal appearance?

Can you share your xlsx file so we can take a closer look?

Phil.

Reply
0 Kudos
Highlighted
Esri Frequent Contributor

Hi Russell,

The issue with default values populating when a question is not relevant has been fixed and you can test it out with latest 3.6 beta builds available on EAC. The latest version to test with is 3.6.100. Please let us know your feedback.

Regards,

Phil.

Reply
0 Kudos
Highlighted
Esri Frequent Contributor