Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Occurrences of a value in a field


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

Recommended Posts

Posted

Hi folks, I'm a newbie here so I hope I'm posting this question in the right place. I'm trying to figure out if there's a way of counting the number of times a value appears in a field ... for example something like

Count(CacheTotal "1 2")

with "1 2" being a value produced by the expression (CacheA & " " B CacheB). I know the above is incorrect but i'm hoping it may illustrate the kind of thing that I'm trying to do. Any help would be GREATLY appreaiated.

Giles

Posted

Hi slstrother,

You forgot a ","

SB

PatternCount(CacheTotal, "1 2")

Hi Giles,

There is also a way to use the PatternCount on the fly, by creating a global field using it in place of your pattern of "1 2". You can then look for any pattern in that field including the "1 2".

I could send you a small demo file of this if you need it.

Lee

cool.gif

Posted

If I understood giles' question, I believe he's looking for a way to count the number of records in which a particular field contains "1 2".

For that I guess the best way to go would be to perform a find on "1 2" in that field, then the result will be Status(CurrentFoundCount)

Posted

Well, now he has a second way to go. I wonder if we will ever know if either one of these is what he wanted.

smile.gif

Posted

Well Lee, if he didn't ask for your sample, I'd rather be interrested by this one.

How come you have so many samples. Did you made a sample database or something ?

Thanks anyway for helping us out every time you can.

Posted

Well, here is a third way (if Jasonwood's interpretations is right).

Make a global field that is called SearchText

Make a calculation called SeachFound that is If(TheField = SearchText, 1, 0)

Make make a summary field which is set as 'Total of SearchFound'.

Then if you enter 1 2 in the SearchText field, the summary field will update to tell you how many times 1 2 appeared in TheField in the current found set of records. This way, you can search always for different things using then same system.

Posted

Hi everybody.

WOW! what a response. Thank you all for your help I really appreciate it! Thanks Lee (smith) for taking the time to make a demo of PatternCount

This topic is 7965 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.