I see there is a Role in the Contribution records now, but I cannot find where that is stored. I would especially like to use the Cr role to pull up Soft Credit contributions. Where is that coming from?
Jan LaRocque
Houston Symphony
Really? No one know where this comes from? Where this code is stored?
The data you see in the Contributions tab appears to be generated by the sproc AP_CONTRIBUTIONS, which has this parameter:
@included_roles varchar(10) = 'O,I,C' -- O - Owner, I - Initiator, C - Creditee
So, you won't find the literal "O", "Cr", etc., in T_CONTRIBUTION. Rather, I suspect the client displays one or the other based on the output of the above sproc.
Hi Jan,
There is a column for role in VS_CONTRIBUTION_WITH_INITIATOR - does that help?
Oh, that's too bad that I can't just pull the "Cr" role. That would make my life so much easier.
Thank you for your reply, Chris.
Thanks, Sheela. Yes, it does help.
So, there is no table to tell you what the numbers 2, 5, 7 in T_ORDER or to define O, Cr, etc? I'd like to know what they mean. I figured them out quite by accident.
Jan
I figured them out for the ticket history screen by literally scrolling through the procedure that updates the ticket history. I am not sure how these translate for contributions/creditees, but one would assume that it would be similar, no?
Also, I am not sure that that data is actually stored anywhere on the T_ORDER table (at least, I cannot find it there), though that information IS displayed on the customer screen on the Orders Tab, so there is a process using it somewhere. It IS on embedded into the T_TICKET_HISTORY table as the Role column, which makes sense. The Orders table does not need it directly, I suppose, since the customer number lives on the order itself.
John, I can't thank you enough for this information. Sure would be nice if there were a table with these descriptions in it, wouldn't it. (Hint, hint, Tessitura).
This page will be printed and prominently displayed at my desk.
Thanks,
I know this part. What I could not find was a translation for the numbering system; 1 = Owner; 2 = Initiator;, etc. Or that they can be combined into multiple codes 7 = OIR.
John A. Moskal II said:I am not sure how these translate for contributions/creditees
Those values don't translate directly to SCs, which are stored in a separate table, i.e. T_CREDITEE, which is usually joined to T_CONTRIBUTION something like:
select top 10 c.* ,cr.creditee_no from T_CONTRIBUTION c left join T_CREDITEE cr on c.ref_no = cr.ref_no
Jan LaRocque said:What I could not find was a translation for the numbering system;
From VS_ELEMENTS_TICKET_HISTORY:
CASE T.Role WHEN 1 THEN 'O' WHEN 2 THEN 'I' WHEN 3 THEN 'OI' WHEN 4 THEN 'R' WHEN 5 THEN 'OR' WHEN 6 THEN 'IR' WHEN 7 THEN 'OIR' END AS role_desc,
Which is to say that it's a binary switch:
1 = 'O'
10 (2) = 'I'
100 (4) = 'R'
And the rest is addition...
Look at you, sneaking math into this. I love it!
Another resource where those ticket role IDs and definitions are explicitly spelled out is the Tessitura Table Structures document: https://www.tessituranetwork.com/en/Files/Docs/SystemAdmin/Tessitura-Table-Structures-V14
This doc doesn't cover every single table, but it does include a breakdown of column names, datatypes, and primary/foreign keys for most of the heavy hitters you'll regularly deal with. I've found it helpful as an alternative to diving into SSMS for quick structural questions.