Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
konidena
Creator
Creator

match and wildmatch behaviour

Hi All,

Please help me in getting clarified wildmatch behaviour.

Here is the example

I have used inline statement with the field name as system_result

values of the field are

An error has occurred

Error processing account nnnn


i have loaded this inline statement in the script and added this field to main sheet.

I have created the text box with the the text as "=wildmatch(system_result,'*occurred*')"

As per the wildmatch behaviour, what the text object should display here

If i use "=match(system_result,'An error has occurred'), what the text object should display.

In my case, it is showing the '-' symbol

11 Replies
sunny_talwar

Try this may be:

=If(WildMatch(system_result,'*occurred*'), system_result)

qlikmsg4u
Specialist
Specialist

Or may be, it returns system_result where occurrence of occurred is only one

=Only(If(wildmatch(system_result,'*occurred*'),system_result))

Anonymous
Not applicable

hi srinivas,

use below syntax in straight table :

=If(WildMatch(system_result,'*occurred*'), system_result)


text box will not display any text unless a relevant field is selected

tripatirao
Creator II
Creator II

Hi Srinivas

this is the syntax for wildmatch function


wildmatch( str, expr1 [ , expr2,...exprN ] )

The wildmatch function performs a case insensitive comparison and permits the use of wildcard characters ( * and ?) in the comparison strings.

Example:

wildmatch( M, 'ja*','fe?','mar')

returns 1 if M = January

returns 2 if M = fex


and check with  this

wildmatch(An error has occurred,'*occurred*')

maxgro
MVP
MVP

As per the wildmatch behaviour, what the text object should display here

If i use "=match(system_result,'An error has occurred'), what the text object should display.

it depends on what your select in system_result

for 1 values of system_result you get an answer (0,1), for different values you get -

sasiparupudi1
Master III
Master III

please share a sample

konidena
Creator
Creator
Author

Thanks sunny for your reply.

konidena
Creator
Creator
Author

Thanks neetha for your valid reply.

when I selected the value in the field "system_result", the text box is showing the relevant text.

What is the straight table here?. Please add me to this knowledge.

Also, if you have idea on Peek and previous functions functionality, please explain me with valid real time scenario.

Here is what i know about the peek() and Previous().

Previous() operates on the Input to the Load statement, whereas Peek() operates on the Output of the Load statement.

Peek('employee count',0) returns the first row in the table

Peek('employee count',-1) returns the last row in the table

Peek('employee count') also returns the last row. It means that, if row number not specified, it returns the last row.

Question: Peek() is saying the returns of data based on the mentioned row value. Where exactly we use this peek and Previous functions?

It will be great if you provided the Peek() and Previous() functions example clearly to raise my knowledge.

konidena
Creator
Creator
Author

Thanks tripati rao for your clear reply.