I have set up user defined elements in LP_TICKET_ELEMENTS using IF statements like the following:
If @ude_no = 1
and @customer_no > 0
and @design_type = 'H'
and @li_seq_no in
(
select li_seq_no
from T_SUB_LINEITEM
where price_type in ('235', '347', '266')
)
BEGIN
Select @ude_value = IsNull(a.inputName, '')
From NYSF_SITP_VLINE_ENTRIES a
Where a.customer_no = @customer_no
END
Else
and (
@li_seq_no is null or @li_seq_no not in
Select @ude_value = IsNull(lname, '')
from T_CUSTOMER
where customer_no = @customer_no
When I execute this from within SQL using these parameters
@ude_no
@li_seq_no
@customer_no
@design_type
it outputs correctly. However when I print a ticket-header (with tickets, so a li_seq_no is provided) from within Tessitura for a customer that has one of the price types mentioned in the first IF statement, it outputs as if they belong to the ‘Else’ group.
I ran a trace and found that LP_TICKET_ELEMENTS is called from TP_GET_HEADER_ELEMENTS, but after looking through this procedure I can’t see anything I have done (or haven’t done) in LP_TICKET_ELEMENTS that would cause this behavior. TP_GET_HEADER_ELEMENTS asks for a third parameter @au_set_no that is not being provided but I’m not sure what it actually is.
Does anyone have any ideas? I hope I have made sense. Totally baffled….
So I got this working by changing my code (using @order_no instead of @li_seq_no), however I’m confused about how these 2 sproc’s work. In LP_TICKET_ELEMENTS there are 12 parameters including li_seq_no, however when it is called from TP_GET_HEADER_ELEMENTS only 6 are used to execute it….and li_seq_no isn't one of them
So, I’m guessing you can’t use li_seq_no when your design type is 'H'? I would very much like to use li_seq_no if it is possible...is it?
Thanks for any advice!
Tash
Just FYI - six years later your response here helped me. I was trying to use the local proc and the header design. Was using li_seq_no in my query and couldn't figure out for the life of me why it wasn't returning data.
Thanks!