Hey all,
I've been trying to use this without any success. Basically I'd like any element to show if peformance code(or description) contains certain strings, and to be blank ('') otherwise.
I've tried if(val like 'string1%' or val like 'string2%', 'Output', '')
Is there a syntax that will make this work?
Thanks,
David
Hey David,
I've never tried using "like" in an If statement before in Design Element Properties, but here is an example of a type of statement that definitely works for me.
If(val='123456','HAPPY'+(val),'')
The output of this will of course be HAPPY123456 or nothing.
Maybe it's the spaces in yours that make it not work? Try using 'val' instead of 'Output' perhaps?
Once you get it up and running, it allows you to do some really cool stuff on Ticket Design.
Best of luck!
Beau @ Arts Centre Melbourne
Something else I’ll throw in here, David, just in case… conditional formatting in ticket design does not play well with copy/paste. You’ll have to type the entire thing in. It’s thrown me before, so I thought I’d put it out there.
Cheers,
Kathleen
From: Tessitura Ticketing Forum [mailto:forums-ticketing@tessituranetwork.com] On Behalf Of David Pitak Sent: Thursday, October 16, 2014 4:53 PM To: Kathleen Smith Subject: [Tessitura Ticketing Forum] Using OR in Conditional Mask for Data Element
I believe what you're actually writing in the mask field is an InfoMaker expression. Someone can correct me on this, but perhaps the place to look for the valid operators and functions would be the IM documentation? Or maybe PowerBuilder docs, or something from Sybase?
My guess is if there's no boolean "text contains" operator or function, to do this you'll need to use something like a "string index". If there's a strindex() function (and I have no idea if there is), something like IF(strindex('string1', val)>0, 'output', '') would be what you're looking for.
I've been interested in a comprehensive language spec for the mask field for months, so I'll look into this later and report back if I find anything useful.
Thanks for the insight all!
I used "like" with a single string sucessfully, just not with a series of values.
If we could find out the syntax/language used in the masks, it would go a long way towards making the most of it.
Thanks again!
Oh! I missed that part about what you're doing; got excited about looking for syntax.
Have you tried adding parentheses? If((val LIKE 'string%') OR (val LIKE 'string2%), 'output', '') ?
I think I just burned through 50 pages of ticket stock, but boy do I have some interesting news!
I did some testing, and strangely enough, it appears as though logical statements using LIKE will not work unless the LIKE condition is parenthesized like I suggested.
So:
IF(val LIKE 'val1%' OR 1>0, 'true','false') --won't work, but
IF((val LIKE 'val1%') OR 1>0, 'true','false') --will work just fine
Go figure.
Outside of that, I found the InfoMaker Expression reference, and it seems to match up. I've extracted the relevant pages out of the documentation and posted them in PDF format on my profile.
Of particular interest, I think, is the "Matching text patterns" section and existence of the Match() function. You can use regular expressions in your ticket design masks! This allows you to take Wendell's "If val IN" example and simplify it to:
If(Match(val, '^[M-X]$'), '', val) !!
If your two conditional patterns are vastly different, then the LIKE statements with parens is probably the way to go, but RegEx opens up some VERY interesting possibilities. If you're interested in learning regular expressions, an invaluable tool is RegExr: http://www.regexr.com -- it runs your expressions interactively as you type and shows tooltips when you mouseover what you've written.
InfoMaker expression: This may be correct.
We were stumped with ticket masking syntax, and through trial-and-error this syntax worked for us:
If(val in ('M','N','O','P','Q','R','S','T','U','V','W',X'),'',val)
It sorta reminded me of an Excel If/Then/Else statement.
David:
You seem to be on the right track. Hoping you find the correct solution.
From: Tessitura Ticketing Forum [mailto:forums-ticketing@tessituranetwork.com] On Behalf Of Nick Reilingh Sent: Monday, October 20, 2014 15:31 To: Wendell Baskin Subject: Re: [Tessitura Ticketing Forum] Using OR in Conditional Mask for Data Element
From: David Pitak <bounce-davidpitak4103@tessituranetwork.com> Sent: 10/16/2014 4:49:26 PM
This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Ticketing Forum. You may reply to this message to post to the Ticketing forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!
Awesome! I'll be sure to give it a try with the extra paren set. This is a lot of very good info and should really open up what we can do with tickets.