Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
psk180590
Creator III
Creator III

If and Match in Script

Hello All,

I'm looking to have multiple match conditions in my script.

Ex:  if(match(FNum,'140','150','160','170') and Match(ANum,'*'),1,0)as Absolut_N

The First Match works fine but, the second with * doesn't work. Please, help me on how to include  * in a Match condition.

Regards
Sai.

12 Replies
Chanty4u
MVP
MVP

try like this

If(Match([FNum],'140','150','160','170') and Match([Anum],'*'), 'Fnum', Anum)

jwjackso
Specialist III
Specialist III

If(Match(FNum,'140') and Match(ANum,Chr(42)),1,0) as Absolut_N;

wdchristensen
Specialist
Specialist

Might want to verify that [Anum] is not null. The * matches non-null values.

psk180590
Creator III
Creator III
Author

Both the solutions don't work for me. They give 0 as result

PrashantSangle

Can you be more specific with Anum with *

what are you trying to do??

can you explain with sample file??

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Peter_Cammaert
Partner - Champion III
Partner - Champion III

First things first: what is it that you want to test? And what does your data look like?

jwjackso
Specialist III
Specialist III

What are the possible values for Anum?

Chanty4u
MVP
MVP

may be


if(match(FNum,'140','150','160','170') ,'Yes',if(Match(ANum,'*'),'No',''))  as   Newfield

wdchristensen
Specialist
Specialist

If(Match([FNum],'140','150','160','170'), If(Match([Anum],'*', 1, 0)), -1) as Absolut_N