One form ppdating several cases

Hi everyone,

I’m trying to update two cases within one form. My use case is an application that
monitor our devices distribution.

There are two cases in the application :

  • “mobile_user” tracks a field worker, especially its device usage (handset, credit,
    available storage space).
  • “handset” tracks a device : serial number, manufacturer, model, MEID, IMEI

The link that ties an user and an handset is the phone serial number : having
databases of users and handsets, we’ll be able to deduce the characteristics of the
user handset just based on its serial number.

Ideally, the form would look like this :

Value 1 : What is your handset serial number ?
This question update a “mobile_user” case.

Value 2 : What is the state of your handset ?

  • Working
  • Broken
  • Lost
  • Stolen
    This question updates an “handset” case.

Is there a way to update two cases based within the same form ? Editing the form
XML is okay.

Many thanks,

··· -- Charles Flèche mHealth Advisor Télécoms Sans Frontières http://www.tsfi.org Première Urgence - Aide Médicale Internationale http://www.pu-ami.org

Hi Charles,

That’s an interesting use case!

What you described is supported in our app builder, in a limited way,
through Child Cases. If the parent/child relationship could work for your
mobile_user and handset cases (e.g. handset is a parent case of
mobile_user), then what you described is supported.

Usually, forms can only update/load case properties from one case type (the
case type of the module). However, child cases know who their parent is. If
the module’s case type is a child case, the forms in that module can update
the parent case through the case management UI in addition to the child
case. However, this does not work the other way around - parent case forms
cannot update its child cases.

If you need more flexibility than this, there are custom XML workarounds
that we can talk about off-thread.

Hope this helps!
Amelia

··· On Tue, Jan 20, 2015 at 6:30 AM, Charles Flèche wrote:

Hi everyone,

I’m trying to update two cases within one form. My use case is an
application that monitor our devices distribution.

There are two cases in the application :

  • “mobile_user” tracks a field worker, especially its device usage
    (handset, credit, available storage space).

  • “handset” tracks a device : serial number, manufacturer, model, MEID,
    IMEI

The link that ties an user and an handset is the phone serial number :
having databases of users and handsets, we’ll be able to deduce the
characteristics of the user handset just based on its serial number.

Ideally, the form would look like this :

Value 1 : What is your handset serial number ?

This question update a “mobile_user” case.

Value 2 : What is the state of your handset ?

  • Working

  • Broken

  • Lost

  • Stolen

This question updates an “handset” case.

Is there a way to update two cases based within the same form ? Editing
the form XML is okay.

Many thanks,

Charles Flèche

mHealth Advisor

Télécoms Sans Frontières http://www.tsfi.org

Première Urgence - Aide Médicale Internationale http://www.pu-ami.org


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 Amelia,

Thanks for your answer. I’ll see what I can do with parent / child cases. Can I contact
you offline if I need further assistance on the XML tricks ?

Many thanks,

··· On Thursday 22 January 2015 10:07:02 Amelia Sagoff wrote: > Hi Charles, > > That's an interesting use case! > > What you described is supported in our app builder, in a limited way, > through Child Cases. If the parent/child relationship could work for your > mobile_user and handset cases (e.g. handset is a parent case of > mobile_user), then what you described is supported. > > Usually, forms can only update/load case properties from one case type (the > case type of the module). However, child cases know who their parent is. If > the module's case type is a child case, the forms in that module can update > the parent case through the case management UI in addition to the child > case. However, this does not work the other way around - parent case forms > cannot update its child cases. > > If you need more flexibility than this, there are custom XML workarounds > that we can talk about off-thread. > > Hope this helps! > Amelia > > On Tue, Jan 20, 2015 at 6:30 AM, Charles Flèche wrote: > > Hi everyone, > > > > I'm trying to update two cases within one form. My use case is an > > application that monitor our devices distribution. > > > > > > > > There are two cases in the application : > > > > * "mobile_user" tracks a field worker, especially its device usage > > (handset, credit, available storage space). > > > > * "handset" tracks a device : serial number, manufacturer, model, MEID, > > IMEI > > > > > > > > The link that ties an user and an handset is the phone serial number : > > having databases of users and handsets, we'll be able to deduce the > > characteristics of the user handset just based on its serial number. > > > > > > > > Ideally, the form would look like this : > > > > > > > > Value 1 : What is your handset serial number ? > > > > This question update a "mobile_user" case. > > > > > > > > Value 2 : What is the state of your handset ? > > > > * Working > > > > * Broken > > > > * Lost > > > > * Stolen > > > > This question updates an "handset" case. > > > > > > > > Is there a way to update two cases based within the same form ? Editing > > the form XML is okay. > > > > > > > > Many thanks, > > > > > > > > -- > > > > Charles Flèche > > > > mHealth Advisor > > > > Télécoms Sans Frontières http://www.tsfi.org > > > > Première Urgence - Aide Médicale Internationale http://www.pu-ami.org > > > > > > > > -- > > 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.


Charles Flèche
mHealth Advisor
Télécoms Sans Frontières http://www.tsfi.org
Première Urgence - Aide Médicale Internationale http://www.pu-ami.org

Feel free to reach out if you have more specific questions, we can figure
out the right way for you to get support.

··· On Mon, Jan 26, 2015 at 12:27 AM, Charles Flèche wrote:

Hi Amelia,

Thanks for your answer. I’ll see what I can do with parent / child cases.
Can I contact you offline if I need further assistance on the XML tricks ?

Many thanks,

On Thursday 22 January 2015 10:07:02 Amelia Sagoff wrote:

Hi Charles,

That’s an interesting use case!

What you described is supported in our app builder, in a limited way,

through Child Cases. If the parent/child relationship could work for your

mobile_user and handset cases (e.g. handset is a parent case of

mobile_user), then what you described is supported.

Usually, forms can only update/load case properties from one case type
(the

case type of the module). However, child cases know who their parent is.
If

the module’s case type is a child case, the forms in that module can
update

the parent case through the case management UI in addition to the child

case. However, this does not work the other way around - parent case
forms

cannot update its child cases.

If you need more flexibility than this, there are custom XML workarounds

that we can talk about off-thread.

Hope this helps!

Amelia

On Tue, Jan 20, 2015 at 6:30 AM, Charles Flèche < mhealth-myanmar@tsfi.org> wrote:

Hi everyone,

I’m trying to update two cases within one form. My use case is an

application that monitor our devices distribution.

There are two cases in the application :

  • “mobile_user” tracks a field worker, especially its device usage

(handset, credit, available storage space).

  • “handset” tracks a device : serial number, manufacturer, model, MEID,

IMEI

The link that ties an user and an handset is the phone serial number :

having databases of users and handsets, we’ll be able to deduce the

characteristics of the user handset just based on its serial number.

Ideally, the form would look like this :

Value 1 : What is your handset serial number ?

This question update a “mobile_user” case.

Value 2 : What is the state of your handset ?

  • Working
  • Broken
  • Lost
  • Stolen

This question updates an “handset” case.

Is there a way to update two cases based within the same form ? Editing

the form XML is okay.

Many thanks,

Charles Flèche

mHealth Advisor

Télécoms Sans Frontières http://www.tsfi.org

Première Urgence - Aide Médicale Internationale http://www.pu-ami.org

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.

Charles Flèche

mHealth Advisor

Télécoms Sans Frontières http://www.tsfi.org

Première Urgence - Aide Médicale Internationale http://www.pu-ami.org


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.