ODK Build - can't include field names in instance_name?

I am attempting to update a form based on an update message displayed on the final page of the form "You are at the end of...[form name]". I'm informed that I'll no longer be able to manually edit the save name of the form, so I'm attempting to add an instance_name as disccussed here: https://docs.getodk.org/build-intro/. I have two fields I'd like to include in the instance_name (named Client and Plot_no), so I am trying to write an expression which includes these as the form's saved name. Based on the ODK Build documentation and other forum threads, I tried entering this expression as:
concat(${Client}, ' ', ${Plot_no})
When I attempt to upload this to ODK Aggregate, I get an error stating "Could not upload the form. Aggregate could not validate the form contents. Please make sure your form is valid and try again."
What am I doing wrong? Is this a syntax issue? Does ODK Aggregate not support dynamic fields for instance_name? Please help!

Hi @MorenoForestry

ODK Aggregate is no longer actively maintained so I won't test it for you but when it comes to the expression you shared...
concat(${Client}, ' ', ${Plot_no})

this is how it should look in xls https://xlsform.org/en/#settings-worksheet but in ODK Build it should rather be: concat(/data/Client,/data/Plot_no) and you would need to make sure that paths to Client and Plot_no are correct.
Generally, if you use ODK Build it would be easier to export the form to xlsx and then define the instance name in that more convenient way concat(${Client}, ' ', ${Plot_no}) as described in the documentation https://xlsform.org/en/#settings-worksheet

Many thanks Grzesiek. I use ODK Build since I am not super talented at building forms in xlsform. I did try, however, but I'm getting an error. Here's what I'm doing:

  1. export form from ODK Build
  2. edit "instance_name" in settings tab to concat(${Client}, ' ', ${Plot_no})
  3. save form as .xlsx, attempt to upload at ODK Aggregate, but I'm receiving an error that I don't know how to interpret:

Error: Problem with JavaRosa Parsing Form: org.opendatakit.aggregate.exception.ODKIncompleteSubmissionData: org.javarosa.xform.parse.XFormParseException: XML Syntax Error at Line: 2, Column: 76!

I'm not sure if this is because I'm attempting to upload the .xlsx, and not a .xml file? I attempted to save the .xlsx as .xml and was informed by Excel that I can't do that because "the workbook does not contain any XML mappings". So I feel stuck. Any further help would be appreciated!

Yes, you have to convert xlsx to xml first, you can't upload xlsx to Aggregate. Use this online tool to do that: https://getodk.org/xlsform/

1 Like

You solved it! It worked. Many, many thanks :slight_smile:

1 Like