need help in xform generated by openxdata

29 views
Skip to first unread message

Subramaniyam KMV

unread,
Sep 4, 2014, 7:54:48 AM9/4/14
to openxd...@googlegroups.com
hi,

Please find the attached file. We are using ODK Collect Application to sync with our openxdata server..

I want to insert   <group apperance="field-list"> after the body tag.

We are trying, but not able to find a better solution.

Kindly help us.

Thanks.


file.xml

Raghu Mittal

unread,
Sep 4, 2014, 8:03:33 AM9/4/14
to openxd...@googlegroups.com
Hi Subramaniyam,

Please do the following in your xml (i.e. within your Openxdata xml):
<group>
  <group apperance="field-list">
     ........
  </group>
</group>

That is, have 2 nested group tags. This happens because OXD-ODK bridge discards the first group tag. With this change, you should be able to get the desired result.

Regards,
Raghu
__________________________________________________________________________

Raghu Mittal
Co-founder & Tech Lead
Handheld Solutions & Research Labs Pvt Ltd


--
You received this message because you are subscribed to the Google Groups "openXdata Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openxdata-de...@googlegroups.com.
To post to this group, send email to openxd...@googlegroups.com.
Visit this group at http://groups.google.com/group/openxdata-dev.
For more options, visit https://groups.google.com/d/optout.

Subramaniyam KMV

unread,
Sep 4, 2014, 8:12:33 AM9/4/14
to openxd...@googlegroups.com
Hi Raghu,

i'am not able to understand. Can you tell me the steps.

Thanks.

Raghu Mittal

unread,
Sep 4, 2014, 8:25:16 AM9/4/14
to openxd...@googlegroups.com
Let me begin by asking you. What are the things you have tried to get the field-list appearance on ODK. Are you trying to edit your form using the Forms designer? Or are you somehow editing your xform xml?

Subramaniyam KMV

unread,
Sep 4, 2014, 8:35:15 AM9/4/14
to openxd...@googlegroups.com
Hi raghu,

we are trying to edit the xml in odk collect code. Is it possible to change from server side ??

Thanks.

Raghu Mittal

unread,
Sep 4, 2014, 8:50:34 AM9/4/14
to openxd...@googlegroups.com
Oh, yes. What i suggested will be applicable on the server-side. I don't recommend doing this on the ODK-Collect side, since it will be hard-coding and any change in your form will probably require a change to ODK-Collect code. This can lead to a big mess very quickly later on, when your data collectors are actually collecting data and it becomes difficult to push the changed app to everyone.

Subramaniyam KMV

unread,
Sep 4, 2014, 9:01:50 AM9/4/14
to openxd...@googlegroups.com
Hi raghu,

Thanks for your reply.

How can we change this in server side ?? if you have already done, Kindly let me know the steps.

Waiting for your reply.

Thanks.

Raghu Mittal

unread,
Sep 4, 2014, 9:05:34 AM9/4/14
to openxd...@googlegroups.com
Subramaniyam, the way to do this is:
1. Goto the OXD database and find the xform xml in 'form_definition_version' table. You might want to refer to 'form_definition' table to see the id of the form you are looking for.
2. Edit directly on the database and save.

Dagmar Timler

unread,
Sep 4, 2014, 2:50:50 PM9/4/14
to openXdata Developers

We need to change purcforms so we can just edit the xml!

Subramaniyam KMV

unread,
Sep 11, 2014, 6:24:34 AM9/11/14
to openxd...@googlegroups.com
hi Dagmar,

Can you tell me where we need to change the code in purcforms.

Thanks.

Dagmar Timler

unread,
Sep 11, 2014, 6:44:25 AM9/11/14
to openXdata Developers
HI

Sorry to say but this will not be a one line feature (and I don't know the answer off hand - I'd have to do some in depth research first).

We have discussed it previously - where we have suggested that it should be possible to "lock" forms and then allow the user to edit the XML via the form designer or dashboard. This would be infinitely better than editing forms via the database (which in my experience requires the server to be restarted).

Should you have enough development experience to give it a bash, you would need to start in the form runner code. You'd also eventually need to change the server code.

Thanks
Dagmar

Subramaniyam KMV

unread,
Sep 11, 2014, 7:59:41 AM9/11/14
to openxd...@googlegroups.com
hi Dagmar,

I can see the org.openxdata.forms dependency in webapp's pom.xml file.

how does the webapp uses this dependency ??

Kindly explain.

Thanks.

Raghu Mittal

unread,
Sep 11, 2014, 10:07:02 AM9/11/14
to openxd...@googlegroups.com
Hi Dagmar,

I am surprised by your comment regarding need to restart the server after editing the form xml. We have edited forms on the db, and were immediately able to download the changed form on our device. In certain exceptional cases, I did see that the forms were not being changed even when we changed on the db, but that was very rare and I really haven't figured out why that happens. Probably, hibernate sometimes caches the database object and hence doesn't update it? But as i said, it was very rare to see this scenario.

Regards,
Raghu


Dagmar Timler

unread,
Sep 11, 2014, 3:28:57 PM9/11/14
to openXdata Developers
Hi Raghu

I think the error comes from the forms dependency - when you have the study in the form designer it gets cached. I am sure that might explain why you only experienced it sometimes. What do you think - could you test it? Do you use the form designer often?

Subramaniyam,

Regarding the forms dependency in the webapps - it's basically the form designer and form runner (i.e. data capture on the dashboard). You can notice another application when you go into edit (design) forms. Sadly I noticed the architecture documents are out of date (and don't even show the forms dependency!).

Regards
Dagmar
Reply all
Reply to author
Forward
0 new messages