Upload errors, Relative Paths and Relevant filter

Hi,

I am trying to create a form that will filter particular questions within a repeat based on responses given to two earlier questions in the same repeat.

The form I have created validates fine, but when I attempt to upload it, I get to ODK Aggregate, I get this:

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.IllegalStateException
org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407)
javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108)
javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108)
org.springframework.security.web.context.SaveContextOnUpdateOrErrorResponseWrapper.sendError(SaveContextOnUpdateOrErrorResponseWrapper.java:81)
org.opendatakit.aggregate.servlet.FormUploadServlet.doPost(FormUploadServlet.java:342)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.opendatakit.common.security.spring.SecurityContextHolderAwareAuthPreservingRequestFilter.doFilter(SecurityContextHolderAwareAuthPreservingRequestFilter.java:66)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.opendatakit.common.security.spring.OpenIDAuthenticationFilter.doFilter(OpenIDAuthenticationFilter.java:42)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.opendatakit.common.security.spring.DigestAuthenticationFilter.doFilter(DigestAuthenticationFilter.java:42)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.opendatakit.common.security.spring.OutOfBandUserFilter.doFilter(OutOfBandUserFilter.java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.opendatakit.common.security.spring.Oauth2ResourceFilter.doFilter(Oauth2ResourceFilter.java:351)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:144)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

It appears as though any reference to a relative path in a relevant column will produce the error. I for the life of me cannot figure out a way around this. I've attached a example of the form I am using.

Slimmed.xlsx (13.6 KB)

(I assume you converted this XLSX to XML before trying to upload...)

Seems to upload fine for me: https://msundt-agg-test2.appspot.com/

This form is "Slimmed_borken" (sic)

··· On Thu, Apr 9, 2015 at 1:15 PM, wrote:

Hi,

I am trying to create a form that will filter particular questions within
a repeat based on responses given to two earlier questions in the same
repeat.

The form I have created validates fine, but when I attempt to upload it, I
get to ODK Aggregate, I get this:

type Exception report

message

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception

java.lang.IllegalStateException

org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407)

javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108)

javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108)

org.springframework.security.web.context.SaveContextOnUpdateOrErrorResponseWrapper.sendError(SaveContextOnUpdateOrErrorResponseWrapper.java:81)

org.opendatakit.aggregate.servlet.FormUploadServlet.doPost(FormUploadServlet.java:342)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)

org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.opendatakit.common.security.spring.SecurityContextHolderAwareAuthPreservingRequestFilter.doFilter(SecurityContextHolderAwareAuthPreservingRequestFilter.java:66)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.opendatakit.common.security.spring.OpenIDAuthenticationFilter.doFilter(OpenIDAuthenticationFilter.java:42)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.opendatakit.common.security.spring.DigestAuthenticationFilter.doFilter(DigestAuthenticationFilter.java:42)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.opendatakit.common.security.spring.OutOfBandUserFilter.doFilter(OutOfBandUserFilter.java:105)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.opendatakit.common.security.spring.Oauth2ResourceFilter.doFilter(Oauth2ResourceFilter.java:351)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:144)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)

org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

It appears as though any reference to a relative path in a relevant column
will produce the error. I for the life of me cannot figure out a way
around this. I've attached a example of the form I am using.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

That is...very bizarre. I did convert it prior to uploading, attached is the xml. Does that work for you?

Wait. Our Aggregate server is v1.3.1 Production. Skimming the error message, it looks like the problem is related to javarosa. Is it possible the reason why this form won't upload is because v1.3.1 uses an older version of javarosa?

Slimmed.xml (14 KB)

··· On Thursday, April 9, 2015 at 2:30:07 PM UTC-6, Mitch Sundt wrote: > (I assume you converted this XLSX to XML before trying to upload...) > > Seems to upload fine for me: https://msundt-agg-test2.appspot.com/ > > This form is "Slimmed_borken" (sic) > > > > > On Thu, Apr 9, 2015 at 1:15 PM, wrote: > Hi, > > > > I am trying to create a form that will filter particular questions within a repeat based on responses given to two earlier questions in the same repeat. > > > > The form I have created validates fine, but when I attempt to upload it, I get to ODK Aggregate, I get this: > > > > type Exception report > > > > message > > > > description The server encountered an internal error () that prevented it from fulfilling this request. > > > > exception > > > > java.lang.IllegalStateException > > org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407) > > javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108) > > javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108) > > org.springframework.security.web.context.SaveContextOnUpdateOrErrorResponseWrapper.sendError(SaveContextOnUpdateOrErrorResponseWrapper.java:81) > > org.opendatakit.aggregate.servlet.FormUploadServlet.doPost(FormUploadServlet.java:342) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:637) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) > > org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) > > org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.opendatakit.common.security.spring.SecurityContextHolderAwareAuthPreservingRequestFilter.doFilter(SecurityContextHolderAwareAuthPreservingRequestFilter.java:66) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.opendatakit.common.security.spring.OpenIDAuthenticationFilter.doFilter(OpenIDAuthenticationFilter.java:42) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.opendatakit.common.security.spring.DigestAuthenticationFilter.doFilter(DigestAuthenticationFilter.java:42) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.opendatakit.common.security.spring.OutOfBandUserFilter.doFilter(OutOfBandUserFilter.java:105) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.opendatakit.common.security.spring.Oauth2ResourceFilter.doFilter(Oauth2ResourceFilter.java:351) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:144) > > org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) > > org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) > > org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) > > org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) > > org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259) > > > > It appears as though any reference to a relative path in a relevant column will produce the error. I for the life of me cannot figure out a way around this. I've attached a example of the form I am using. > > > > -- > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > --- > > You received this message because you are subscribed to the Google Groups "ODK Community" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > > > > -- > > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com

Absolutely.

1.3.1 is ancient. current()/ didn't exist back then.

··· On Thu, Apr 9, 2015 at 1:53 PM, wrote:

That is...very bizarre. I did convert it prior to uploading, attached is
the xml. Does that work for you?

Wait. Our Aggregate server is v1.3.1 Production. Skimming the error
message, it looks like the problem is related to javarosa. Is it possible
the reason why this form won't upload is because v1.3.1 uses an older
version of javarosa?

On Thursday, April 9, 2015 at 2:30:07 PM UTC-6, Mitch Sundt wrote:

(I assume you converted this XLSX to XML before trying to upload...)

Seems to upload fine for me: https://msundt-agg-test2.appspot.com/

This form is "Slimmed_borken" (sic)

On Thu, Apr 9, 2015 at 1:15 PM, awe...@pdx.edu wrote:
Hi,

I am trying to create a form that will filter particular questions
within a repeat based on responses given to two earlier questions in the
same repeat.

The form I have created validates fine, but when I attempt to upload it,
I get to ODK Aggregate, I get this:

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

java.lang.IllegalStateException

org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:407)

javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108)

javax.servlet.http.HttpServletResponseWrapper.sendError(HttpServletResponseWrapper.java:108)

org.springframework.security.web.context.SaveContextOnUpdateOrErrorResponseWrapper.sendError(SaveContextOnUpdateOrErrorResponseWrapper.java:81)

org.opendatakit.aggregate.servlet.FormUploadServlet.doPost(FormUploadServlet.java:342)

    javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)

org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.opendatakit.common.security.spring.SecurityContextHolderAwareAuthPreservingRequestFilter.doFilter(SecurityContextHolderAwareAuthPreservingRequestFilter.java:66)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.opendatakit.common.security.spring.OpenIDAuthenticationFilter.doFilter(OpenIDAuthenticationFilter.java:42)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.opendatakit.common.security.spring.DigestAuthenticationFilter.doFilter(DigestAuthenticationFilter.java:42)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.opendatakit.common.security.spring.OutOfBandUserFilter.doFilter(OutOfBandUserFilter.java:105)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.opendatakit.common.security.spring.Oauth2ResourceFilter.doFilter(Oauth2ResourceFilter.java:351)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:144)

org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)

org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

It appears as though any reference to a relative path in a relevant
column will produce the error. I for the life of me cannot figure out a
way around this. I've attached a example of the form I am using.

--

--

Post: opend...@googlegroups.com

Unsubscribe: opendatakit...@googlegroups.com

Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.

To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--

Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Hmmm... is there a reason why I can submit a form with a choice filter that uses current() without any problems?

no idea.

In any case, you should upgrade.

··· On Thu, Apr 9, 2015 at 2:11 PM, wrote:

Hmmm... is there a reason why I can submit a form with a choice filter
that uses current() without any problems?

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

The sticking point is that I don't administer the Aggregate server and we may not be able to upgrade for a month is so.

To step back for a moment, I am trying to make sense of why I need to use relative referencing in repeats at all. As I've interpreted it, the problem is that when you complete one repeat and then start another, a question that references the value of another question won't work probably because ODK doesn't know if you're referencing a value in the current repeat or in the previous one.

What confuses me is that I have a form with a section that repeats and within that section there are questions with relevance filters that reference questions inside the same repeat group. Never had a problem with it. Is it just a matter of groups? Do you need relative paths only when you're referencing a value outside of a group? A repeat?

Whenever you are developing a form with a repeat, ALWAYS test it with 2 or
more instances of the repeated section.

The problem is that if you have a form:

Then when you specify ${q1}, it is expanded as:

/data/q1

And when you specify ${q2}, it is expanded as

/data/repeat1/q2

When you use these in an expression:

. <= ${q1}

expands to

. <= /data/q1

And since there is only one q1, it always works and resolves to the value
of the q1 field.

For repeat groups, the first time through, a similar expression:

. <= ${q2}

expands to:

. <= /data/repeat1/q2

And with ONLY ONE INSTANCE of the repeat group, when this is evaluated,
/data/repeat1/q2 refers to one 'q2' (from that first instance). To be
precise, it refers to:

/data/repeat1[position() = 1]/q2

And the expression evaluates correctly.

With TWO INSTANCES of the repeat group, when this is evaluated,
/data/repeat1/q2 refers to two 'q2' values:

/data/repeat1[position() = 1]/q2
/data/repeat1[position() = 2]/q2

And at this point, the expression evaluator when it tries to evaluate the
". <= ___" term, will find that ___ is not a single item (or a set
containing a single item), but a set of two items.

And it will throw an exception that will generally lead to a Force Close of
ODK Collect.

··· ------------- Unfortunately, you only see this failure when you add the 2nd instance of the repeat group.

This simply means that you need to be more specific when you are writing
forms involving repeat groups, and ensure that you are referring to the
instance of the repeat group that you wanted to refer to.

On Thu, Apr 9, 2015 at 3:41 PM, awells@pdx.edu wrote:

The sticking point is that I don't administer the Aggregate server and we
may not be able to upgrade for a month is so.

To step back for a moment, I am trying to make sense of why I need to use
relative referencing in repeats at all. As I've interpreted it, the
problem is that when you complete one repeat and then start another, a
question that references the value of another question won't work probably
because ODK doesn't know if you're referencing a value in the current
repeat or in the previous one.

What confuses me is that I have a form with a section that repeats and
within that section there are questions with relevance filters that
reference questions inside the same repeat group. Never had a problem with
it. Is it just a matter of groups? Do you need relative paths only when
you're referencing a value outside of a group? A repeat?

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Oops. That should have been position(.) in the above (and this is an
example of the problems with XPath expressions using '.' -- where it is
used, the '.' refers to the /data/repeat1 node, and not the current field
in which the formula is being evaluated).

AND NOTE: using indexed-repeat(,,) in combination with position(..)
eliminates this problem.

It has the huge advantage that if you add a begin-end group, you don't need
to update your expression. It works with ${fieldname} absolute references
and simply "does the right thing".

··· On Fri, Apr 10, 2015 at 10:02 AM, Mitch Sundt wrote:

Whenever you are developing a form with a repeat, ALWAYS test it with 2 or
more instances of the repeated section.

The problem is that if you have a form:

Then when you specify ${q1}, it is expanded as:

/data/q1

And when you specify ${q2}, it is expanded as

/data/repeat1/q2

When you use these in an expression:

. <= ${q1}

expands to

. <= /data/q1

And since there is only one q1, it always works and resolves to the value
of the q1 field.

For repeat groups, the first time through, a similar expression:

. <= ${q2}

expands to:

. <= /data/repeat1/q2

And with ONLY ONE INSTANCE of the repeat group, when this is evaluated,
/data/repeat1/q2 refers to one 'q2' (from that first instance). To be
precise, it refers to:

/data/repeat1[position() = 1]/q2

And the expression evaluates correctly.

With TWO INSTANCES of the repeat group, when this is evaluated,
/data/repeat1/q2 refers to two 'q2' values:

/data/repeat1[position() = 1]/q2
/data/repeat1[position() = 2]/q2

And at this point, the expression evaluator when it tries to evaluate the
". <= ___" term, will find that ___ is not a single item (or a set
containing a single item), but a set of two items.

And it will throw an exception that will generally lead to a Force Close
of ODK Collect.


Unfortunately, you only see this failure when you add the 2nd instance of
the repeat group.

This simply means that you need to be more specific when you are writing
forms involving repeat groups, and ensure that you are referring to the
instance of the repeat group that you wanted to refer to.

On Thu, Apr 9, 2015 at 3:41 PM, awells@pdx.edu wrote:

The sticking point is that I don't administer the Aggregate server and we
may not be able to upgrade for a month is so.

To step back for a moment, I am trying to make sense of why I need to use
relative referencing in repeats at all. As I've interpreted it, the
problem is that when you complete one repeat and then start another, a
question that references the value of another question won't work probably
because ODK doesn't know if you're referencing a value in the current
repeat or in the previous one.

What confuses me is that I have a form with a section that repeats and
within that section there are questions with relevance filters that
reference questions inside the same repeat group. Never had a problem with
it. Is it just a matter of groups? Do you need relative paths only when
you're referencing a value outside of a group? A repeat?

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

... or, at least, the only thing you might need to update is to change
position(..) to position(../..) to account for the new nested group.

··· On Fri, Apr 10, 2015 at 10:12 AM, Mitch Sundt wrote:

Oops. That should have been position(.) in the above (and this is an
example of the problems with XPath expressions using '.' -- where it is
used, the '.' refers to the /data/repeat1 node, and not the current field
in which the formula is being evaluated).

AND NOTE: using indexed-repeat(,,) in combination with position(..)
eliminates this problem.

It has the huge advantage that if you add a begin-end group, you don't
need to update your expression. It works with ${fieldname} absolute
references and simply "does the right thing".

On Fri, Apr 10, 2015 at 10:02 AM, Mitch Sundt mitchellsundt@gmail.com wrote:

Whenever you are developing a form with a repeat, ALWAYS test it with 2
or more instances of the repeated section.

The problem is that if you have a form:

Then when you specify ${q1}, it is expanded as:

/data/q1

And when you specify ${q2}, it is expanded as

/data/repeat1/q2

When you use these in an expression:

. <= ${q1}

expands to

. <= /data/q1

And since there is only one q1, it always works and resolves to the value
of the q1 field.

For repeat groups, the first time through, a similar expression:

. <= ${q2}

expands to:

. <= /data/repeat1/q2

And with ONLY ONE INSTANCE of the repeat group, when this is evaluated,
/data/repeat1/q2 refers to one 'q2' (from that first instance). To be
precise, it refers to:

/data/repeat1[position() = 1]/q2

And the expression evaluates correctly.

With TWO INSTANCES of the repeat group, when this is evaluated,
/data/repeat1/q2 refers to two 'q2' values:

/data/repeat1[position() = 1]/q2
/data/repeat1[position() = 2]/q2

And at this point, the expression evaluator when it tries to evaluate the
". <= ___" term, will find that ___ is not a single item (or a set
containing a single item), but a set of two items.

And it will throw an exception that will generally lead to a Force Close
of ODK Collect.


Unfortunately, you only see this failure when you add the 2nd instance of
the repeat group.

This simply means that you need to be more specific when you are writing
forms involving repeat groups, and ensure that you are referring to the
instance of the repeat group that you wanted to refer to.

On Thu, Apr 9, 2015 at 3:41 PM, awells@pdx.edu wrote:

The sticking point is that I don't administer the Aggregate server and
we may not be able to upgrade for a month is so.

To step back for a moment, I am trying to make sense of why I need to
use relative referencing in repeats at all. As I've interpreted it, the
problem is that when you complete one repeat and then start another, a
question that references the value of another question won't work probably
because ODK doesn't know if you're referencing a value in the current
repeat or in the previous one.

What confuses me is that I have a form with a section that repeats and
within that section there are questions with relevance filters that
reference questions inside the same repeat group. Never had a problem with
it. Is it just a matter of groups? Do you need relative paths only when
you're referencing a value outside of a group? A repeat?

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com