Counting number of unique values in a found set
I have 2 layouts (A,B) that each contain a single portals. In layout (A) there's an Order no. field and there's a LineItem portal. In the portal there's a (Go to related records) button that opens Layout (B). Layout (B) also has it's own lineItems portal.
Layout (A) has Order information along with a list of the items ordered in the portal
Layout (B) has the individual Item information and the items details in the portal
I'd like to count the records of the found set displayed in Layout (B)'s portal. I have a calculation field on Layout (B), it counts the unique fields in the table occurrence for the portal. The problem I'm having is that while the calculation counts the unique fields, it counts every unique field for the order.