I'm trying to get an Output Set to spit out the total number of tickets a patron has ever bought, I know I have to set it up TR_Query_Element but I've got no idea what to put in the Data Select field or other necessary fields. Any help would be greatly appreciated!
Leah Anglum,
Assuming you just want, straight up and down, a total number of all the "seats" appearing in a patron's account on their "ticket history" tab, this one should not be too bad. Basically, you should just be able to copy the (should be standard) element that is called "Tickets - Total Amount" in the "Ticketing - Ticket History" grouping. Then, in your newly copied row, where it says "sum(tck_amt)", change that to "sum(num_seats)".
You will still want to test it out before relying on the data to make sure it is exactly what you want, but it should work reasonably well. It should even still work with output set filters, too, but I would have to test that out as well to be sure.
Hope that helps!
John A. Moskal II
One extra note to be mindful of is how the output elements are handling ticket roles (owner, initiator, and recipient), in case that skews the data you're expecting to see. I'm sorry I can't dig into the specifics to know the answer to this right now (whether the output elements are including or excluding specific roles out of the box), but I've certainly had cases in the past where our ticket amounts or counts from Ticket History look higher than we'd expect, due to things like extra rows for initiator or recipient-only orders (where the patron is involved but is not the actual owner of the ticket order, as defined by Tessitura). I usually limit to role = 1, 3, 5, and 7 (only roles that include ownership) when querying T_TICKET_HISTORY off the cuff, to work around this.