Connect vs. Web form functionality: repeats, calculations, relevant statements

2106
7
12-17-2018 02:40 PM
PhillipBailey
New Contributor

performed in S123 v. 3.1 (3.1.126 in Connect)

Hello,

I have created and tested a XLSForm in S123 Connect and trying to publish in the S123 Web form format. The main basis for this form is to collect daily production data (for 1 week, 1 well at a time). When publishing to the web, the calculations, relevant statements within the repeat section do not work the same way as in Connect. 

For example, in Connect the calculation field ${day_readout} increments by (1) as each entry is entered.

However, both the date and integer (Day # 2, in this case) within the integer type field named ${volume}are not displaying properly in the web version after each entry is populated.

I read in a previous forum that this calculation may not be supported yet on the web version:

format-date(date-time(decimal-date-time(${start_date} + int(${day_count_conv}))),'%m/%d/%Y')

Survey123 Time Capture and calculation 

Same general error for another equation for hidden type field named ${sub_days}:

int(${day_counter})+1

The "day_counter" fields use the count function to capture how day entries (>=0) have been entered.

Question 1: Are the calculations not compatible or is it something else?

Towards the end of the repeat section, there is an relevant statement on a collapsed "Step 3" Group that does not open even after 7 entries are entered.

Connect (works)

Web (does not work)

Question 2: Why is the relevant statement not working to open "Step 3" Group? Do repeat counts work (or numbered) the same way in both Connect and web form? It looks like in Connect it starts at "0" count and on the web form "1"...?

I'm wondering if any workarounds can be done to function on the web. The must have's are: 1) users must be able to input daily data and 2) daily data must be tabled in rows (1 day, 1 well --> 1 row)

0 Kudos
7 Replies
Jim-Moore
Esri Regular Contributor

Hi Phillip

Thanks for providing your XLSForm. At first glance it looks like this could be a limitation with how the count(repeat) function works in the web form. We're investigating the issue and will get back to you with an update.

Thanks,

Jim

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Phillip

Confirming that this has been logged in our system as an issue for further investigation. In the web form, when used inside a repeat the count() function resets to 1 for each record in the repeat. Our team is looking into this and I'll update this post with any developments.

Regarding Question 2, this goes some way to explaining why the Step 3 group does not appear in the web form: the relevant expression is never satisfied because the count() is never greater than 1. A workaround in the meantime would be to put a count() calculation in a question outside of the repeat and use this for the relevant expression.

Also, the repeat_count set in your XLSForm will be honoured in the web form. I notice that the XLSForm you provided has repeat_count set to 6; this should be 7 if you're expecting 7 daily entries. The count() function will return a zero until there's a valid entry in the field it's counting. Please see the attached XLSForm as a demo. Hope this is useful.

Kind regards,

Jim

0 Kudos
PhillipBailey
New Contributor

Thanks for escalating this for further investigation Jim (and communicating that).

I will try the workarounds for now. I believe I tried "7" before as the count but still wasn't working. Does Connect and web forms differ on how the counters count? I want to say I was seeing a difference.

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Phillip, the web form should display the same number of repeats as specified in the repeat_count column in your XLSForm; but please send through screenshots if you're seeing something different so we can take a look. Thanks, Jim

0 Kudos
DerrickWestoby1
New Contributor III

Jim Moore‌ - I posted this in the beta discussion forum too, but I think this may be related to Philip's question? 

-----------------------------------------------------------------------

I have a Survey that is used to create simple PDF reports with images, captions & reference maps.  Each repeat contains an image, a caption and a geopoint.  The geopoint is populated by using pulldata on the attached image's exif, and I was very happy to finally get that calculation working in a web form this morning.  

Unlike the mobile form though, it appears that the web form will only work on the very first image uploaded.  If you click "+" to add a new repeat/entry and then attach an image, it will clear the first geopoint and also fail to update the current one.  

Here's a link directly to the survey form - https://survey123.arcgis.com/share/fa930ed8e09448e698096cde9c7c883b 

short video of the behavior - https://vimeo.com/332087152/7bb244f2f7

Is this a known limitation, a bug, or user error?  

Thanks, 
Derrick

JamesTedrick
Esri Esteemed Contributor

Just to note, this question was addressed in the Early Adopter Community - it is an issue with the webform.

ZhifangWang
Esri Regular Contributor

Hi @PhillipBailey @DerrickWestoby1 ,

Just FYI, we confirmed that the issue "count() or sum() inside a repeat does not work as expected in the web app" cannot be fixed at this time.

Please consider using one of the following workarounds to help your workflow:

  • Move sum() or count() outside a repeat
  • Add a sum() or count() outside the repeat as usual, then reference its value as calculation inside the repeat

 

Thanks,

Zhifang

0 Kudos