Page 1 of 1

multiple function calls

Posted: Thu May 22, 2014 7:37 pm
by eric.graham
I am working with two text boxes, one Integer for ID, and one String for Order Number. I am wanting to show the value (either ID searched for in one text box, or Order Number searched for in the other text box) in a Table. - In the Data: Table, I can only get one of following to work:
Code: Select all
{index, size -> getTickets(id)}
Code: Select all
{index, size -> getTicketsbyOrderNumber(ordernumber)}
but not both. (Meaning I would like to look for if the ID text box passes an Integer, OR look for a order number if the text box passes a String.) - Is there a way to call one function (UP DATED: sorry, the calls were to query s) or the other inside of the expression?

Re: multiple function calls

Posted: Thu May 22, 2014 8:54 pm
by Byron Glueck
You may wish to consider passing multiple parameters to your query. Then you can handle null values in your query condition.

For example:
getTickets(ticketId, orderNumber)
Iterator: ticket
Condition: ((ticketId = null or ticketId = and (orderNumber = null or orderNumber = ticket.orderNumber))

Re: multiple function calls

Posted: Thu May 22, 2014 9:04 pm
by eric.graham
Thanks for the speedy response glueck! That worked like a charm. I did something similar in an earlier try, but did not catch the condition quite as you suggested. Thanks again :D