uemtux Posted February 23, 2012 Posted February 23, 2012 I have a database of contact attempts. Every time a salesman makes contact with a client, be it by e-mail, phone, sending a fax, whatever, they make an entry in this table. I sort these records first by the user that created them, and then by type. On my layout I have only subsummaries, one for sorting by user, the other for sorting by contact type, so when I sort I get a header with the person's name, followed by 1 "line item" for each type of contact with a count: example: *James * 9 EMail 1 No Contact 1 Order 2 Fax The contact types (email, order, etc) are in an editable value list. We allow new types to be created arbitrarily. What I'm looking for is a way to run a find on James' records and from that do processing to get an output (an array, let's say) similar to this: $variable[1] = "9 Email" $variable[2] = "1 No Contact" $variable[3] - "1 Order"
comment Posted February 23, 2012 Posted February 23, 2012 Assuming you already have a summary field sCount defined as Count of [some non-empty field], try something like: # AFTER FINDING AND SORTING Go to Record [ First ] Loop Set Variable [ $i ; $i + 1 ] Set Variable [ $n ; GetSummary ( sCount ; Type ) ] Set Variable [ $variable[$i] ; $n & " " & Type ] Set Variable [ $next ; Get ( RecordNumber ) + $n ] Exit Loop If [ $next > Get ( FoundCount ) ] Go to Record [ $next ] End Loop
Recommended Posts
This topic is 4657 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 accountSign in
Already have an account? Sign in here.
Sign In Now