Function based criteria gives error "Adding Criteria failed"

Function based criteria gives error "Adding Criteria failed"

Hello

I have the following setup:
  1. I have a form "Form1" where I maintain departments for users
  2. I have a function getUsersDepartment that returns the department for zoho.loginuser from "Form1"
  3. In another form "Form2" I have a department attribute based on a formula in which I call "thisapp.getUsersDepartment()". This works great.
  4. In the criteria for the List View based on "Form2" I give "(Department == getUsersDepartment())" I get the following error:
Adding Criteria failed.
 Please try after some time or refresh the page and try again.

I have tried this multiple times and it still keeps failing.

Are function based criteria not allowed or is this a bug?

Harpal