Question about results of archiving a form, when that form had created a subcase

Hi there! A question about archiving a form.

I have already read this guidance about what happens when I archive a form:
https://confluence.dimagi.com/display/commcarepublic/Archive+Forms#ArchiveForms-HowtoArchiveMultipleForms

It says “If the form created or updated multiple cases, the main case and
all subcases will be affected

But please imagine this scenario.

– I have a registration form called A1 that registers a new case of type
"client." In that form, if questions are answered in a certain way, then
the result is that this form also results in the creation of a subcase,
of type “referral.” Which is used for a referral to a clinic.

– So, let’s say that a worker fills out that A1 registration form to
register a new “client.” … And, that they answer the questions in such
a way that yes indeed, a subcase of type “referral” is made.

– But also, let’s say that someone then continues forward and opens up
that subcase in our “C1” form that is used for recording the services to
that referral client. So they actually go to the C1 form, they choose that
newly created referral case from the case list, and they create a new C1
form for that new referral case that had been created.

Then, let’s pretend that I go back a month later and I ARCHIVE the original
A1 form. Can you answer these questions:

(1) Naturally, that would result in deleting the “client” case that the A1
form registered to begin with. You clearly say that in the documentation.

(2) in my italicized quote above, you say that also the subcase will be
"affected." Will this subcase (of type “referral”) also be completely
deleted?

(3) Lastly, what about the C1 form that was created for that subcase?
Will that C1 FORM be deleted or archived?

Thanks much!
Eric

Hey Eric,

Super quick answers inline.

Hi there! A question about archiving a form.

I have already read this guidance about what happens when I archive a form:

https://confluence.dimagi.com/display/commcarepublic/Archive+Forms#ArchiveForms-HowtoArchiveMultipleForms

It says “If the form created or updated multiple cases, the main case
and all subcases will be affected

But please imagine this scenario.

– I have a registration form called A1 that registers a new case of type
"client." In that form, if questions are answered in a certain way, then
the result is that this form also results in the creation of a subcase,
of type “referral.” Which is used for a referral to a clinic.

– So, let’s say that a worker fills out that A1 registration form to
register a new “client.” … And, that they answer the questions in
such a way that yes indeed, a subcase of type “referral” is made.

– But also, let’s say that someone then continues forward and opens up
that subcase in our “C1” form that is used for recording the services to
that referral client. So they actually go to the C1 form, they choose that
newly created referral case from the case list, and they create a new C1
form for that new referral case that had been created.

Then, let’s pretend that I go back a month later and I ARCHIVE the
original A1 form. Can you answer these questions:

(1) Naturally, that would result in deleting the “client” case that the A1
form registered to begin with. You clearly say that in the documentation.

Correct (unless other forms were also submitted against A1 - see below).

(2) in my italicized quote above, you say that also the subcase will be
"affected." Will this subcase (of type “referral”) also be completely
deleted?

It would be deleted had there not been a second form submitted. In the case
where you delete the form that creates a case (or subcase) but there are
other existing forms that update it, things get pretty messy. Specifically,
the information in the “create” form gets removed (this typically includes
the case type and case name) but the information from the other forms still
applies. This typically results in cases that have no name, no type, and
are generally hard to work with on HQ. In this situation we recommend that
you archive all forms associated with the case and start from scratch.

(3) Lastly, what about the C1 form that was created for that subcase?
Will that C1 FORM be deleted or archived?

It will not. Archiving a form will always only affect that form and the
data in that form that updated cases.

thanks,
Cory

··· On Fri, May 20, 2016 at 3:16 AM, Eric Stephan wrote:

Thanks much!
Eric


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Cory -- Thanks for your info here... There have been further
developments:

I took the advice you gave, and archived *all *the forms that were
associated with these cases that I wanted to get rid of. As I mentioned, my
first registration form is form A1, and that form creates a child case of
type "referral," and then the form that records services given in the that
child referral case is form C1.

So, I went into my project and I first archived over 50 C1 forms, and then
after that I went and deleted the original A1 forms. That seemed best
order to do it. Because archiving the A1 forms first would weirdly leave
those C1 forms in limbo prior to my archiving them.

HOWEVER, after doing those two sets of form archiving, I went to do a forms
export to see the result of my work, and the result was that the forms
export generated an error and said the export wasn't possible. I tried it
several times, and same result.

SOOO, I submitted a bug report. see the bug report confirmation email
below.... I hope this gets fixed soon, because this has resulted in my
whole project being unable to do forms exports! :slight_smile:

It's probably clear in the bug repot, but the project is: epm-thai

=== BUG REPORT CONFIRMATION:

··· -----Original Message----- From: CommCare HQ Support Sent: Monday, May 23, 2016 12:25 PM To: Eric Stephan Subject: Re: (Case 227563) Bug (slightly time sensitive) --> Doing a forms export results in "There was an error downloading your report"... after I did

This address is for potential bugs that you experience while using
CommCareHQ and CommCare Mobile. Thank you for your message; we have
received it and will get back to you as soon as possible.

You can check the status of your message at the following URL:

http://manage.dimagi.com/default.asp?227563_8fn1ua8dtf01lv8j

You may want to save your case's tracking ticket: 227563_8fn1ua8dtf01lv8j

  1. For documentation, please feel free to browse and search the CommCare
    help site: Home - CommCare Public - Dimagi Confluence

  2. For implementation questions, please message the CommCare Users Google
    Group: Google Groups

Please reply to this message if there's anything else we can do for you.

--

CommCare HQ Support

commcarehq-support@dimagi.com

Hey Eric,

Thanks for the update and sorry to hear you're facing difficulties now.
Someone on our support team will follow up via the ticket.

best,
cory

··· On Mon, May 23, 2016 at 5:34 AM, Eric Stephan wrote:

Hi Cory -- Thanks for your info here... There have been further
developments:

I took the advice you gave, and archived *all *the forms that were
associated with these cases that I wanted to get rid of. As I mentioned, my
first registration form is form A1, and that form creates a child case of
type "referral," and then the form that records services given in the that
child referral case is form C1.

So, I went into my project and I first archived over 50 C1 forms, and then
after that I went and deleted the original A1 forms. That seemed best
order to do it. Because archiving the A1 forms first would weirdly leave
those C1 forms in limbo prior to my archiving them.

HOWEVER, after doing those two sets of form archiving, I went to do a
forms export to see the result of my work, and the result was that the
forms export generated an error and said the export wasn't possible. I
tried it several times, and same result.

SOOO, I submitted a bug report. see the bug report confirmation email
below.... I hope this gets fixed soon, because this has resulted in my
whole project being unable to do forms exports! :slight_smile:

It's probably clear in the bug repot, but the project is: epm-thai

=== BUG REPORT CONFIRMATION:

-----Original Message-----
From: CommCare HQ Support
Sent: Monday, May 23, 2016 12:25 PM
To: Eric Stephan
Subject: Re: (Case 227563) Bug (slightly time sensitive) --> Doing a forms
export results in "There was an error downloading your report"... after I
did

This address is for potential bugs that you experience while using
CommCareHQ and CommCare Mobile. Thank you for your message; we have
received it and will get back to you as soon as possible.

You can check the status of your message at the following URL:

FogBugz

You may want to save your case's tracking ticket: 227563_8fn1ua8dtf01lv8j

  1. For documentation, please feel free to browse and search the CommCare
    help site: Home - CommCare Public - Dimagi Confluence

  2. For implementation questions, please message the CommCare Users Google
    Group: Google Groups

Please reply to this message if there's anything else we can do for you.

--

CommCare HQ Support

commcarehq-support@dimagi.com

--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.