Working on our customer's data, I've noticed that multiple forms share the
same XMLNS by looking at the source of the forms. A wild guess would be
that these forms have been copied from one another.
However, as the XMLNS is the key to access a specific form through the
APIs, I'd have expected it to be unique regardless of the origin.
As a result, when using the list forms API with a filter on the XMLNS, it
returns data from all the forms sharing the same key.
Given I already have a workaround (downloading both forms using the @name
attribute to filter the data), is there a safe way to correct this
situation without breaking any form / data ?
You're right that this likely comes from copying (typically downloading and
uploading) applications or forms.
Unfortunately there is no way to change a form's XMLNS after it has been
submitted.
best,
Cory
···
On Thu, Jan 5, 2017 at 5:05 PM, Marco Pravato wrote:
Working on our customer's data, I've noticed that multiple forms share the
same XMLNS by looking at the source of the forms. A wild guess would be
that these forms have been copied from one another.
However, as the XMLNS is the key to access a specific form through the
APIs, I'd have expected it to be unique regardless of the origin.
As a result, when using the list forms API with a filter on the XMLNS, it
returns data from all the forms sharing the same key.
Given I already have a workaround (downloading both forms using the @name
attribute to filter the data), is there a safe way to correct this
situation without breaking any form / data ?
Dimagi support confirms that there is a stable unique constraint on the
combination: app_id, xmlns.
So, if you duplicate a form across applications, you will find duplicate
xmlns.
Duplicating a form within one application yields unique xmlns.
Best,
—Alex
···
On Thursday, January 5, 2017 at 6:35:08 AM UTC-5, Marco Pravato wrote:
>
> Working on our customer's data, I've noticed that multiple forms share the
> same XMLNS by looking at the source of the forms. A wild guess would be
> that these forms have been copied from one another.
>
> However, as the XMLNS is the key to access a specific form through the
> APIs, I'd have expected it to be unique regardless of the origin.
>
> As a result, when using the list forms API with a filter on the XMLNS, it
> returns data from all the forms sharing the same key.
>
> Given I already have a workaround (downloading both forms using the @name
> attribute to filter the data), is there a safe way to correct this
> situation without breaking any form / data ?
>
> Thanks
> Regards
> Marco
>
>
>