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