Form designer changes my form structure after upload

Dear All,
I am trying to implement a functionality which uses external instances (
javarosa / javarosa / wiki / externalinstances — Bitbucket) which
forces me to edit my form manually and upload the form back to the edit on
commcareHQ. Whenever I upload the form, it changes structure by moving the
item set out of the question and it change the reference to null.
Befrore uploading.....







After uploading the file .........

*

before_upload.xml (10.2 KB)

after_upload.xml (13.7 KB)

··· * * * * ............ .......... .........* * *

I am attaching the complete forms for your reference.
Any Idea of what can be causing this and how resolve it, I am stuck!
Thanks.

--
Peter Dotto Lubambi,
Information Technology Officer,
D-tree International,
Tanzania.
+255 786 087 087
PPP: http://tz.linkedin.com/in/plubambi

Peter,

Looks like there's definitely an issue with how HQ is handling your form
upload, sorry about that!

The HQ team will follow up about that issue, but before they do I did
notice that your itemset structure is a bit off. you're referring to

instance('route_data')/route_data

as the root nodeset, which can't be the right node. The first node in an
external instance must be a single node, as it's an independent xml doc.
There should be another step there which refers to the actual repeated
node. Something like

instance('route_data')/route_data/route

Do you have the fixture uploaded somewhere we can look at?

-Clayton

··· On Wed, Jan 9, 2013 at 1:59 AM, Peter D Lubambi wrote:

Dear All,
I am trying to implement a functionality which uses external instances (
javarosa / javarosa / wiki / externalinstances — Bitbucket) which
forces me to edit my form manually and upload the form back to the edit on
commcareHQ. Whenever I upload the form, it changes structure by moving the
item set out of the question and it change the reference to null.
Befrore uploading.....







After uploading the file .........

*
*

  •            <label ref="jr:itext('route-label')" />*
    
  •        </select1>
    

............
..........
.........*



I am attaching the complete forms for your reference.
Any Idea of what can be causing this and how resolve it, I am stuck!
Thanks.

--
Peter Dotto Lubambi,
Information Technology Officer,
D-tree International,
Tanzania.
+255 786 087 087
PPP: http://tz.linkedin.com/in/plubambi

Hey Peter,

Just wanted to let you know that we're looking into this and are hoping to
get back to you on a timeline for resolving it as soon as we can. Sorry
about the troubles.

Cory

··· On Wed, Jan 9, 2013 at 11:39 AM, Clayton Sims wrote:

Peter,

Looks like there's definitely an issue with how HQ is handling your form
upload, sorry about that!

The HQ team will follow up about that issue, but before they do I did
notice that your itemset structure is a bit off. you're referring to

instance('route_data')/route_data

as the root nodeset, which can't be the right node. The first node in an
external instance must be a single node, as it's an independent xml doc.
There should be another step there which refers to the actual repeated
node. Something like

instance('route_data')/route_data/route

Do you have the fixture uploaded somewhere we can look at?

-Clayton

On Wed, Jan 9, 2013 at 1:59 AM, Peter D Lubambi plubambi@gmail.comwrote:

Dear All,
I am trying to implement a functionality which uses external instances (
javarosa / javarosa / wiki / externalinstances — Bitbucket) which
forces me to edit my form manually and upload the form back to the edit on
commcareHQ. Whenever I upload the form, it changes structure by moving the
item set out of the question and it change the reference to null.
Befrore uploading.....







After uploading the file .........

*
*

  •            <label ref="jr:itext('route-label')" />*
    
  •        </select1>
    

............
..........
.........*



I am attaching the complete forms for your reference.
Any Idea of what can be causing this and how resolve it, I am stuck!
Thanks.

--
Peter Dotto Lubambi,
Information Technology Officer,
D-tree International,
Tanzania.
+255 786 087 087
PPP: http://tz.linkedin.com/in/plubambi

Hi Clayton,

  1. My domain is 'maternalznz', application 'mHealth for safer deliveries'.
    I am trying to load route data (route_name, price ) registered using
    form 'Usajili-
    Orodha ya malipo ya
    usafirihttps://www.commcarehq.org/a/maternalznz/apps/view/02848fb7b7f14a945bc6cad5e43a29bd/modules-0/forms-0/?edit=true'
    to form 'Anzisha rufaa ya
    mamahttps://www.commcarehq.org/a/maternalznz/apps/view/02848fb7b7f14a945bc6cad5e43a29bd/modules-3/forms-4/?edit=true'
    using the external instance...
    From your comment and re-reading of the documentation on external instance,
    i have modified the 'anzisha rufaa form' (attached) a bit and the instance
    looks this way....
....... ....... ....... ....... This way the validator doesn't throw any more errors and the form structure doesn't change. I am able to build app ver 812 but I ca not open the 'Anzisha rufaa form'. Please, if you can have a look at it!
  1. One concept I have not managed to grasp from my reading is how does
    this referencing instance distinguish between data node (with the same
    name) of two different forms
    For example I have these two forms

Registration.xml

<?xml version="1.0" encoding="UTF-8" ?>

<h:html xmlns:h="http://www.w3.org/1999/xhtml" xmlns:orx="
http://openrosa.org/jr/xforms" xmlns="XForms Namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="
http://openrosa.org/javarosa">
<h:head>
<h:title>Anzisha rufaa ya mama</h:title>



<date_transport />
<car_type />
<driver_name />

<origin_of_trip />
.......
.....
......

Another_form.xml

<?xml version="1.0" encoding="UTF-8" ?>

<h:html xmlns:h="http://www.w3.org/1999/xhtml" xmlns:orx="
http://openrosa.org/jr/xforms" xmlns="XForms Namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="
http://openrosa.org/javarosa">
<h:head>
<h:title>Usajili- Orodha ya malipo ya usafiri</h:title>




<district_name />


.....
......
......
.....

in the
third_form.xml
I want to load data of route node from registration form, How do i specify
to make sure I reference to route in the registration form
?

Thanks

Anzisha-rufaa.xml (10.1 KB)

··· On Wed, Jan 9, 2013 at 7:39 PM, Clayton Sims wrote:

Peter,

Looks like there's definitely an issue with how HQ is handling your form
upload, sorry about that!

The HQ team will follow up about that issue, but before they do I did
notice that your itemset structure is a bit off. you're referring to

instance('route_data')/route_data

as the root nodeset, which can't be the right node. The first node in an
external instance must be a single node, as it's an independent xml doc.
There should be another step there which refers to the actual repeated
node. Something like

instance('route_data')/route_data/route

Do you have the fixture uploaded somewhere we can look at?

-Clayton

On Wed, Jan 9, 2013 at 1:59 AM, Peter D Lubambi plubambi@gmail.comwrote:

Dear All,
I am trying to implement a functionality which uses external instances (
javarosa / javarosa / wiki / externalinstances — Bitbucket) which
forces me to edit my form manually and upload the form back to the edit on
commcareHQ. Whenever I upload the form, it changes structure by moving the
item set out of the question and it change the reference to null.
Befrore uploading.....







After uploading the file .........

*
*

  •            <label ref="jr:itext('route-label')" />*
    
  •        </select1>
    

............
..........
.........*



I am attaching the complete forms for your reference.
Any Idea of what can be causing this and how resolve it, I am stuck!
Thanks.

--
Peter Dotto Lubambi,
Information Technology Officer,
D-tree International,
Tanzania.
+255 786 087 087
PPP: http://tz.linkedin.com/in/plubambi

--
Peter Dotto Lubambi,
Information Technology Officer,
D-tree International,
Tanzania.
+255 786 087 087
PPP: http://tz.linkedin.com/in/plubambi

Peter,

I'm a bit confused. External instances are read only. You can't register
data into an external instance in the manner you seem to be describing...

If you want to register data and then read it into a form, you can either
do so with Cases (you can refer to the case database as an external
instance), or you can add the data into HQ as a Fixture, and read the
fixture data through that external interface.

-Clayton

··· On Thu, Jan 10, 2013 at 5:45 AM, Peter D Lubambi wrote:

Hi Clayton,

  1. My domain is 'maternalznz', application 'mHealth for safer deliveries'.
    I am trying to load route data (route_name, price ) registered using form 'Usajili-
    Orodha ya malipo ya usafirihttps://www.commcarehq.org/a/maternalznz/apps/view/02848fb7b7f14a945bc6cad5e43a29bd/modules-0/forms-0/?edit=true'
    to form 'Anzisha rufaa ya mamahttps://www.commcarehq.org/a/maternalznz/apps/view/02848fb7b7f14a945bc6cad5e43a29bd/modules-3/forms-4/?edit=true'
    using the external instance...
    From your comment and re-reading of the documentation on external
    instance, i have modified the 'anzisha rufaa form' (attached) a bit and the
    instance looks this way....
....... ....... ....... .......
            <label ref="jr:itext('route-label')" />
            <itemset nodeset="instance('route')/route_data/route_name">

            <label ref="route_name"/>
            <value ref="route_name"/>
            </itemset>
        </select1>

This way the validator doesn't throw any more errors and the form
structure doesn't change. I am able to build app ver 812 but I ca not open
the 'Anzisha rufaa form'.
Please, if you can have a look at it!

  1. One concept I have not managed to grasp from my reading is how does
    this referencing instance distinguish between data node (with the same
    name) of two different forms
    For example I have these two forms

Registration.xml

<?xml version="1.0" encoding="UTF-8" ?>

<h:html xmlns:h="http://www.w3.org/1999/xhtml" xmlns:orx="
http://openrosa.org/jr/xforms" xmlns="XForms Namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="
http://openrosa.org/javarosa">
<h:head>
<h:title>Anzisha rufaa ya mama</h:title>



<date_transport />
<car_type />
<driver_name />

<origin_of_trip />
.......
.....
......

Another_form.xml

<?xml version="1.0" encoding="UTF-8" ?>

<h:html xmlns:h="http://www.w3.org/1999/xhtml" xmlns:orx="
http://openrosa.org/jr/xforms" xmlns="XForms Namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="
http://openrosa.org/javarosa">
<h:head>
<h:title>Usajili- Orodha ya malipo ya usafiri</h:title>




<district_name />


.....
......
......
.....

in the
third_form.xml
I want to load data of route node from registration form, How do i specify
to make sure I reference to route in the registration form
?

Thanks

On Wed, Jan 9, 2013 at 7:39 PM, Clayton Sims csims@dimagi.com wrote:

Peter,

Looks like there's definitely an issue with how HQ is handling your form
upload, sorry about that!

The HQ team will follow up about that issue, but before they do I did
notice that your itemset structure is a bit off. you're referring to

instance('route_data')/route_data

as the root nodeset, which can't be the right node. The first node in an
external instance must be a single node, as it's an independent xml doc.
There should be another step there which refers to the actual repeated
node. Something like

instance('route_data')/route_data/route

Do you have the fixture uploaded somewhere we can look at?

-Clayton

On Wed, Jan 9, 2013 at 1:59 AM, Peter D Lubambi plubambi@gmail.comwrote:

Dear All,
I am trying to implement a functionality which uses external instances (
javarosa / javarosa / wiki / externalinstances — Bitbucket) which
forces me to edit my form manually and upload the form back to the edit on
commcareHQ. Whenever I upload the form, it changes structure by moving the
item set out of the question and it change the reference to null.
Befrore uploading.....







After uploading the file .........

*
*

  •            <label ref="jr:itext('route-label')" />*
    
  •        </select1>
    

............
..........
.........*



I am attaching the complete forms for your reference.
Any Idea of what can be causing this and how resolve it, I am stuck!
Thanks.

--
Peter Dotto Lubambi,
Information Technology Officer,
D-tree International,
Tanzania.
+255 786 087 087
PPP: http://tz.linkedin.com/in/plubambi

--
Peter Dotto Lubambi,
Information Technology Officer,
D-tree International,
Tanzania.
+255 786 087 087
PPP: http://tz.linkedin.com/in/plubambi