XLS Form works in Survey123 Connect but not Survey123 APP

3201
2
12-20-2015 02:27 PM
SimonAllard1
New Contributor III

Hi there,

I have worked on a new survey form for algal monitoring in streams. Four transects are completed for a reach of stream and several algal types are sampled at five verticals along each transect. Originally, I had used repeats for each transect but the user had to manually select each of the verticals and it was not possible to use relevance, calculations, or make question required within the repeat construct - which was causing some data entry errors (people forgetting to select the verticals in order or forgetting to select a vertical). 

I wanted to get rid of repeats so that I can implement relevance, makes questions required and perform an error checking calculation in the survey to reduce user entry error rates. My form works and performs well in Survey123 Connect but does not work in the Survey123 APP and is extremely slow to load (takes 3:30 - 4:30 minutes to load). Is this because there too many rows of questions in my XLS Form (see attached - 237 rows of xls questions).

I tried truncating the survey to only include one transect with five verticals and everything works. Now I want to do this but for a total of four verticals. Maybe I am pushing the limits of the software here?

Can anyone think of another way to construct this survey so that I can perform all 4 transects in the same survey without using repeats?

Have multiple page surveys been implemented in Survey123 yet? This might provide a solution for me.

Cheers,

Simon

0 Kudos
2 Replies
IsmaelChivite
Esri Notable Contributor

Hi Simon.  I tested your survey with the latest version of  Connect and the app (on iOS). I found that the sum of the cover percentages was not working for me if any of the algal types was  missing. After adding a default value of 0 to all algaltype cover question, the sum started working. I tested on Connect and then in the app in iOS.

I think using a repeat for the transects is a good idea. Everything seemed to be working until I added a value of 5 to the repeat_count column. This is needed to ensure all 5 transects and their verticals are completed. After adding the repeat_count, the SUM of covers stopped working.

Pages could be an option for you, given that we cannot enforce 5 repeats. I did not try pages, but here is how you could use them:

  1. In the Settings page, add a new column called style and set its value to pages
  2. Add a new appearance in the types worksheet called field-list
  3. Use the field-list appearance on the groups you want to turn into pages

Please note that pages are not yet implemented completely. They work currently as described in our Early Adopter Program. It does not hurt to try.

We definitively need to look at why the SUM stops working when using the repeat_column. Unless I missed something, it seemed to me like the best approach.

0 Kudos
IsmaelChivite
Esri Notable Contributor

Ok. A bit more on this.

Have a look at the attached file.

I think this should be working as you expect.

I modified the calculations for the SUMs:

  • I removed the cast to integer int(    The cast is not necessary. It used to be needed in old versions, but not anymore. It does not hurt, but I removed it to make the expressions simpler
  • I added a coalesce function. This did the trick. Coalesce ensures that if a variable has a null value, a value of 0 is set to it

The problem with the SUM not working relates to how null values are handled. Null + 1 is not 1. Null + 1 is equal to Null.  When any of the variables added to the SUM the end result will be null and as such you will not see the question populated. It looks like if the SUM never happened.

  • Initially I added 0 values to the default column, and this helped by removing all the null values, but as soon as I added the repeat_count it stopped working
  • The reason is that default values are not applied correctly when repeat_count is used. We will look at this more closely as this may be a bug.

In any event, with coalesce you will make your calculation expression much more robust.

Again, I believe the attached survey should do it for you.  I added the repeat.

In my iPhone6 your survey now loads in barely 3 seconds.

0 Kudos