CommCare – How to Reference Mobile Worker’s Username in Case List Filter

commcare

I'm trying to create a case list filter in CommCare. Specifically I want to create a filter such that a case property (interviewer_username) is equal to the username of the person who is logged in. I have seen the instructions for how to do this using custom user data and the mobile worker first/last name, but how do you reference the username itself?

Best Answer

You can access the username of a user in the case list filter with this syntax:

#user/username

More information can be found here: https://confluence.dimagi.com/display/commcarepublic/User+Case. The username isn't stored in Custom User Data, but rather the User Case.