Jump to content

# of Unique Client Records


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

Recommended Posts

In 8.0, I have status records related to client records. There can be many status change records per client. When I do a find on status record types, I'll get several records with duplicate client ID's. Lets say there's 10 records, 2 per client. The number of unique Client ID's would be 5.

Problem: How can I setup a calculation field that will correctly show the # of unique Client ID's in each found set??

Thanks in advance for your HELP!

Link to comment
Share on other sites

So now I do have time.

Attached is an example of what is probably the easiest way that uses very little overhead. It is scripted, with a refresh button necessary unless any operation which can change the found set is scripted, in which case you can call the script as a sub-script from your existing scripts.

There are other methods, some which use only calculations but require the found set to be sorted in order to evaluate properly. They also use much more overhead. So I would recommend a scripted method over any of them.

UniqueValuesInFoundSet.zip

Link to comment
Share on other sites

Ah, so that was the question. If scripting is the way, then given (a) that the counted values are unique in the parent (Clients) table, and (:) version 8, you could also do it like this:

Go to Related Record ["Clients”] [ Show only related records; Match found set; New window ]

Set Field [ Status::gUniqueCount ; Get (FoundCount) ]

Close Window [ Current Window ]

Link to comment
Share on other sites

  • 2 weeks later...

This topic is 5685 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
 Share

×
×
  • Create New...

Important Information

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