Exporting form fields via MDS

I have edited my form schema and would like to share with others to use in their environments for testing form functionality. There seems there is no **form filed** item from the list of items that can be exported only field is available. Is there a way of sharing the form fields such that it will contain the form and the field the same time? for now one can only share the field and form which are NOT related at all @raff @pascal @mseaton

1 Like

@ningosi, formFields are referenced by a form, see https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/Form.java#L38

Don’t they get exported for you when you choose to export Form?

1 Like

@raff my thoughts initially were that when a form is exported all other dependencies should be included, but to my discover I only saw the form and the encounter type being exported in the header.xml file. Here is a snippet that I saw in the header.xml, meaning the form schema wasn’t exported. Am using MDS 1.2.

1 Like

I realized later that this only happens in my installation, whereby only the form and the encounter types are exported leaving out the form fields, when tested in reffApp, all seem to work well. Has anyone ever experienced this before? Could it be that I have some other modules in my installation that are stopping this from happening normally? or my database contains some elements that are broken? @raff @valvijo @eurico_jose @steliomo @mseaton @pascal

Including a link to the tomcat log may also be helpful. :smile:

Or maybe am doing things the wrong way, let me explain what am doing. I already have a form that had schema before and being used, I found out that additional fileds were needed on it and I decided to add those, then realized that I needed to share the changes with other people to use. So my quickest solution was to get to MDS module to help me out, only to relaize that form and encounter type were the only items exported in the package. Has anyone ever gone through such a test case? @dkayiwa @raff

The MDS package should contain fields when you export a form. Please share the exported package and tomcat logs from the export so we can help investigate why it doesn’t work for you.

1 Like