strange new behavior in groups within a repeat in v3.5.164 on ipad

1276
10
Jump to solution
07-02-2019 03:25 PM
LynnBerni
Occasional Contributor II

Our Bacteria Batch SDE field form includes a repeat for stream water samples collected, with two groups within the repeat: "Sample Collection", and "Sample Analysis".  On day 1, we collect multiple samples and enter them in the "Sample Collection" group.  On day 2, we open the "Sample Analysis" group and toggle through the collected samples to enter additional data (post 24-hour incubation to see what grew overnight).  This functionality is no longer working. And it's failing in a really strange way.

Now, when we click the "+" to enter the next sample, it pops open the Sample Analysis group (overriding the "compact" appearance setting for the group) -AND- gets hung up on the constraint for the second question in the group (see screenshot). It even displays the constraint message, so it's acting like we've tried to send the survey.

It will not let us enter more than one sample without first entering the analysis data, which we won't have until the following day. Luckily we have two other ipads that are running v3.3.64!

I've attached the XLS form (plus the two CSVs in my media folder, just in case they're needed to troubleshoot).

Please help!
Thanks,

Lynn

screenshot

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi Lynn,

You can't check for NaN directly; you should use the comparison 

string-length(.) = 0

as the check for null/NaN. Additionally, you could use or in the check instead of an if:

string-length(.) = 0 or (. >= 0 and . <= 49)

View solution in original post

10 Replies
DougBrowning
MVP Esteemed Contributor

I think this is actually now correct in 3.5.  You should NOT be able to move to the next repeat until ALL constraints are satisfied.  The old way it was letting you skip and move on - which was bad for me.  In fact I had to create workarounds to make sure it did stop from adding a repeat.

Does this sound like it?

This sounds like another care of letting us control when validation happen through settings.

0 Kudos
LynnBerni
Occasional Contributor II

Oh rats. If that's true, then we're going to need to rethink (rebuild) this survey. Ugh.  As described, we move through the repeat to enter multiple records, then revisit those records the following day.  And I cannot remove those constraints. Double ugh.

0 Kudos
DougBrowning
MVP Esteemed Contributor

if I remember right I got around this by using an if in your constraint. So say if value1 is not blank then check constraint otherwise do nothing.

LynnBerni
Occasional Contributor II

Thanks Doug, I can try adding an if statement to my constraint.

Constraints:

ColiformLarge:   . >= 0 and . <= 49
ColiformSmall:   . >= 0 and . <= 48

EcoliLarge:    . >= 0 and . <= 49
EcoliSmall:    . >= 0 and . <= 48

Although I'm not entirely sure how to achieve your suggested:  "if value1 is not blank then check constraint otherwise do nothing". 

I tried the following, but they didn't work:

if(${ColiformLarge} != '', (. >= 0 and . <= 49),'')
if(${ColiformSmall} != '', (. >= 0 and . <= 48),'')

if(${EcoliLarge} != '', (. >= 0 and . <= 49),'')
if(${EcoliSmall} != '', (. >= 0 and . <= 48),'')

Also, it's strange how the form got hung up on the second field with a constraint. Why not the first?  Or all four?

0 Kudos
DougBrowning
MVP Esteemed Contributor

Sorry I should have included that.  I figured it would come up.

You want it to evaluate to true so I just use 1.

So if(check, constraint, 1)

0 Kudos
LynnBerni
Occasional Contributor II

Thanks Doug. Okay,  I made a couple other changes (using NaN since this is an integer field): 

if(. != NaN, (. >= 0 and . <= 49), 1)

Didn't work.

James Tedrick‌ is there something I'm missing?

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Lynn,

You can't check for NaN directly; you should use the comparison 

string-length(.) = 0

as the check for null/NaN. Additionally, you could use or in the check instead of an if:

string-length(.) = 0 or (. >= 0 and . <= 49)

DougBrowning
MVP Esteemed Contributor

I thought of this later also that I should have made the note about integer.  I was on a phone quick.

I do like that way you write that James.  Thanks

DougBrowning
MVP Esteemed Contributor

Again today having lots of QA issues due to 123 not having a way to require validation by Page.

Here is the workflow.

On Page 1 there is a required field of Line Number.

User skips this.

On page 3 they add 50 repeats.  Each repeat inherits the Line Number.

So if Line number is blank all my repeats are PlotKey_ (instead of PlotKey_1).

User submits and Line Number is flagged.  User sets LineNumber to 1.

Now I have the header being correct as PlotKey_1 BUT all my repeats are now orphans.

I am sure you are sick of me asking for this but we are now spending thousands on labor to go back and clean these all up.  Then I take heat.

Please consider it!  Thanks!

0 Kudos