Calculate updating case data from form

Hi,

When updating a case, I am trying to update an original card inventory
based on how many cards were sold.

For example:

  • On his first visit, the supervisor using the app gave a vendor 100
    cards of 500cfa value so the vendor’s original (and current) inventory in
    the registration form (/data/i500) = 100
    • this information is recorded in the registration form and saved as
      the case property “i500”
  • When following up, the supervisor records that he sold 50 cards
    (/data/v500) = 50
  • The same visit, the supervisor also gives him 25 cards (/data/a500) =
    25
  • I add a hidden value to calculate the new inventory called
    (/data/new_i500)
    • When I try to write the calculation, I am unable to find the
      original (i500) or (/data/i500)
    • I added the original inventory as a case property in the follow up
      sheet

Would love some insight on why the case property is not loading…
Thanks,
Marie

Hi Marie,

You mention that when you tried to write the calculation to add the new
values to the previously collected values, you were unable to find the
original.

If you save the original question as a case property, you should then be
able to load it into your form as a hidden value. You can then reference
that hidden value in your calculation.

You can read more about how this part of case management works here
https://confluence.dimagi.com/display/commcarepublic/Advanced+Case+Management+Tutorial?__hstc=187943799.ba674a1a3cdef13c5d09b2a54d65c2b8.1431286503613.1444833960097.1444850351463.415&__hssc=187943799.33.1444850351463&__hsfp=542517172
.

Thanks,
Amelia

··· On Tue, Oct 13, 2015 at 3:34 PM, Marie-laurence Archambault < marie@myagro.org> wrote:

Hi,

When updating a case, I am trying to update an original card inventory
based on how many cards were sold.

For example:

  • On his first visit, the supervisor using the app gave a vendor 100
    cards of 500cfa value so the vendor’s original (and current) inventory in
    the registration form (/data/i500) = 100
    • this information is recorded in the registration form and saved
      as the case property “i500”
  • When following up, the supervisor records that he sold 50 cards
    (/data/v500) = 50
  • The same visit, the supervisor also gives him 25 cards (/data/a500)
    = 25
  • I add a hidden value to calculate the new inventory called
    (/data/new_i500)
    • When I try to write the calculation, I am unable to find the
      original (i500) or (/data/i500)
    • I added the original inventory as a case property in the follow
      up sheet

Would love some insight on why the case property is not loading…
Thanks,
Marie


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.