Using OR in Conditional Mask for Data Element

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

Parents
  • 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.

Reply
  • 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.

Children