Error Converting XLS Form

1267
15
01-23-2023 11:14 AM
CEMPAdminPOC
New Contributor

I have a Survey created in 123Connect that I have an email link.  I am now getting a message that says:  b'ODK Validate Errors:\n>>Something broke the parser.  See above for a hint.\norg.javarosa.xpath.XPathUnsupportedException: XPath evaluation:  unsupported construct[filter expression]\n\nResult: Invalid"

My calculation is as follows:

"Hello," + "\n" + "This is a request to determine the availability for deployment of the following apparatus:" + "\n"+ "\n" + "TYPE: " + ${Type_Group} + "\n" + "COMMON NAME: " + ${Common_Name } + "\n" + "YEAR: " + ${Apparatus_Year} + "\n" +  "MAKE: " + ${Make} + "\n" +  "Please respond ASAP,  using REPLY ALL to advise if you are able to provide apparatus support."  + "\n" + "Thank you for your consideration."

I am assuming the error is in this text due to the \n in the error message.  

Can anyone identify where I have made this error?

0 Kudos
15 Replies
DougBrowning
MVP Esteemed Contributor

I have used \n ok in a calculation with a field of type note.

"Bottom of the reach (1)\nF-transect (1)\nTop of the reach (1)\nOverview (1)\nMonument (3)\nCritical concepts (4:2 annotated and 2 copies unannotated)\nDepositional bank (1 if depositional banks are present)\nErosional bank (1)\nBank erosion feature (1)\nOther (not required)\nFlood Prone Width (Taken on the flood prone width form NOT on this form)"

I have also done join("\n", ${PhotoType})

My guess is the issue is using a \n inside a URL.  Totally different deal.  I would test that.  This link may help  https://stackoverflow.com/questions/3871729/transmitting-newline-character-n 

Another idea is maybe you are over the 255 char limit on that field.

hope that helps

CEMPAdminPOC
New Contributor

Thanks for the reply.  I still get an error message.  It was working previously without issue, but now I can't update the sheet, which I will need to as staff changes.  

I would like help to identify where on my sheet the error message is pointing to.

 

0 Kudos
DougBrowning
MVP Esteemed Contributor

You have a space in the field Respiratory_Mask 

Notice the green box is telling you its a problem.

DougBrowning_0-1674512517638.png

 

Sorry missed that the first time.  Not sure that is it though.

0 Kudos
abureaux
MVP Regular Contributor

The parsing error is in the calculation on line 56. The one one line 55 is fine.

Looks like a comma was out of place:

abureaux_0-1674513708002.png

Change body=,'${Email to body=',${Email

 

Not related to your error, but you have a few syntax issues (High-Moderate-Low is the level of importance, IMO):

  • (Moderate) Many random spaces in things. For example, in your calculation on line 56, there are several spaces after the calculation
  • (High) You have capitals in almost all of you name fields. As stated above, these should all be lower case (lower case, can contain but not start with a number, no special characters other than underscore)
  • (High) As @DougBrowning pointed out below, you have a space at the end of the Respiratory_Mask name
  • (Low) Numerous groups are without a label. I see you are using notes with an empty <font> tag for spacing. You can do the same with groups. to avoid an error
  • (Low) The group starting on line 3 (and missing a label) doesn't appear to do anything
  • (Low) In many spots, you have the old bold start tag without an end tag (In HTML, all tags need to be closed). E.g., <b></b>
0 Kudos
DougBrowning
MVP Esteemed Contributor

@abureaux 

I do not get this one

(High) You have capitals in almost all of you name fields. As stated above, these should all be lower case (lower case, can contain but not start with a number, no special characters other than underscore

There is no reason you cannot use caps that I know of.  I have used it thousands of times.

0 Kudos
abureaux
MVP Regular Contributor

Perhaps there is a setting for this, but this is the default state/result if capitals are used:

abureaux_0-1674573523831.png

When a feature service is created in ArcPro with capitals and then used in S123, it seems to skip this check. Otherwise, this is my reasoning.

Edit. I guess marking it as "high" is misleading in this case. For this particular case, the form is obviously working with the capitals in names, so it's not critical. I tend to always assume that someone else will have a similar problem in the future and will find random threads via Google, so I try to address things that may cause confusion. Sometimes I'm successful! Sometimes not.

0 Kudos
abureaux
MVP Regular Contributor

I dumped your text above into a test, and everything worked.

I replaced all of your tags with "FFFFFF" because I obviously didn't have those fields.

The /n is contained within quotes. I doubt that would be causing an error for you during parsing here.

I did notice that you have extra spaces in some fields. E.g., ${Common_Name }

abureaux_0-1674511136818.png

 

Also, you should avoid capitals for names in S123. E.g., change Common_Name to common_name

 

 

CEMPAdminPOC
New Contributor

Thank you for trying.  I still can't get mine to resolve.  

0 Kudos
DougBrowning
MVP Esteemed Contributor

Good catch on the space.  

But why would you say this?  

"Also, you should avoid capitals for names in S123. E.g., change Common_Name to common_name"

I always use CamelCase for years with no issues.  Curious here.

0 Kudos