Case Display Condition

I want to add two user roles health worker and supervisor in display condition but did not work. With one user role, it works, but after adding two users it does not work. Please help.

count(instance('commcaresession')/session/user/data/user_role) > 0 and
instance('commcaresession')/session/user/data/user_role='health_worker' and 'supervisor'

This statement will not work. The correct statement would be:

count(instance('commcaresession')/session/user/data/user_role) > 0
and
(
instance('commcaresession')/session/user/data/user_role='health_worker'
or
instance('commcaresession')/session/user/data/user_role='supervisor'
)

I hope this helps !!

1 Like

It works perfectly now! Thank you so much :kissing_heart::kissing_heart:

1 Like