Module Filtering - download update failed

Dear all,

I am trying to use module filtering and seem to come across a problem with
my formula when doing it because my phone will not download the update but
gets stuck every time.

I have already checked that I have commcare version 2.20 on web server and
phone.

Here is the formula I have put in the module filtering in case someone has
any
suggestions: count(instance(‘commcaresession’)/session/user/data/userrole)

0 and instance(‘commcaresession’)/session/user/data/userrole= ‘Hotline’

Thanks in advance,

Heidi Lowe

Hi Heidi

That expression is correct but the problem is that the quotes around
’Hotline’ are *special *quotes (left and right single quotations). If you
replace them with a simple ‘single quote’ then it should work.

Also note that you can simplify the expression as follows (quotes also
replaced):

count(#session/user/data/userrole) > 0 and #session/user/data/userrole =
‘Hotline’

The ‘#session’ will get expanded to “instance(‘commcaresession’)/session”

··· On 12 November 2015 at 11:01, Heidi Lowe wrote:

Dear all,

I am trying to use module filtering and seem to come across a problem with
my formula when doing it because my phone will not download the update but
gets stuck every time.

I have already checked that I have commcare version 2.20 on web server and
phone.

Here is the formula I have put in the module filtering in case someone has
any
suggestions: count(instance(‘commcaresession’)/session/user/data/userrole)

0 and instance(‘commcaresession’)/session/user/data/userrole= ‘Hotline’

Thanks in advance,

Heidi Lowe


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.


Simon Kelly
Senior Engineer | Dimagi South Africa