Jump to content

Counting specific records in a Portal


shoil

This topic is 7420 days old. Please don't post here. Open a new topic instead.

Recommended Posts

My portal lists all accounts owned by a specific customer. I want to create a field that will total the number of the ACTIVE accounts (elimiating the CLOSED ones).

The result I'm looking for is a number of ACTIVE accounts that I can use for billing.

Link to comment
Share on other sites

In your related file create a calculation looks at whatever criteria are required for an account to be active and returns a value of 1 if those criteria are met. For simplicity's sake, let's assume your only criterion is a status field that has "Active" or "Inactive", your calculation, cFlag, would look like:

(fieldname="Active")

If the above condition is true, the calculation will return a 1, if not, a 0.

In your main file, create a calculation that looks through the relationship back to the related file and sums all the records whose cFlag equals 1. That calculation looks like:

Sum(relationship::cFlag)

Link to comment
Share on other sites

This topic is 7420 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.