How to pick a minimum value in a range whilst disregarding empty / null values

Hie guys

I'd like to pick the minimum weight of a child from a range of values. some
of these values are null and I would like the minumum calculation to
disregard values that are null instead of defaultin these values =0.

is there a special syntax i can use for this?

Please help

Eva

Hi Eva,

Rhe easiest way to do this is probably to use one of the conditional
functions per argument, and a 'sentinal' value which is larger than the
others IE:

min( coalesce(#form/value, 1000), coalesce(#form/value_two,
1000), coalesce(#form/value_three, 1000))

this would mean that any blank value was evaluated as '1000' rather than
'0'.

-Clayton

··· On Mon, Oct 16, 2017 at 6:16 AM, Eva wrote:

Hie guys

I'd like to pick the minimum weight of a child from a range of values.
some of these values are null and I would like the minumum calculation to
disregard values that are null instead of defaultin these values =0.

is there a special syntax i can use for this?

Please help

Eva

--
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.

Thanks Clayton...

That worked well

··· On Mon, Oct 16, 2017 at 7:03 PM, Clayton Sims wrote:

Hi Eva,

Rhe easiest way to do this is probably to use one of the conditional
functions per argument, and a 'sentinal' value which is larger than the
others IE:

min( coalesce(#form/value, 1000), coalesce(#form/value_two,
1000), coalesce(#form/value_three, 1000))

this would mean that any blank value was evaluated as '1000' rather than
'0'.

-Clayton

On Mon, Oct 16, 2017 at 6:16 AM, Eva eva.tsitsi@gmail.com wrote:

Hie guys

I'd like to pick the minimum weight of a child from a range of values.
some of these values are null and I would like the minumum calculation to
disregard values that are null instead of defaultin these values =0.

is there a special syntax i can use for this?

Please help

Eva

--
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.

--
You received this message because you are subscribed to a topic in the
Google Groups "commcare-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/commcare-users/zdFBzQQT77g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.