function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
blake.tanonblake.tanon 

How to find records in the 'middle'

Hello,

 

I'm not quite sure how to ask for what I'm looking for so I'll tell you what I'm trying to do.

 

I want to find records laying the middle of a range, for example it is easy to find the first date a sales was made and the last date a sales was made.  I want to find the first, second, third, fourth, fifth and sixth dates that sales were made to a contact record.  With this I want to see how many data points for different activities lay within these ranges.  

 

What would be best approach to doing this be?  Is there a way to effectively number the differen sales records?

RoyGiladRoyGilad

I think you should investigate the "reports" tab rather then development in apex for that.

It seems that it will provide you the answer you seek with less effort.

 

blake.tanonblake.tanon

Reports can't do what I need done.  I need to know the number of each data point within the date ranges for each contact.

 

 

Range 1:

All poitns up to first sale date

 

Range 2:

All points from sale 1 to sale 2

 

Range 3:

All points from sale 2 to sale 3

 

And so on.

 

Since this isn't the same for each contact a report can't do this, also I would need some way to label sales as 1,2,3,etc...