I have a customer entity in the customer database with a collection of projects linked in the projects field. I want to count the number of linked projects which is in the “In Planning” workflow state.
I created a formula field for the customer entity with the formula"
Projects.CountUnique(State.Name = "In Planning")
The formula returns 1 if the customer has one or more projects in the collection regardless of the state of the projects. If the company has two or more projects attached and one of the projects has the state of “In Progress” the formula returns 2. Totally confusing.
What am I doing wrong or is this a bug?