Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

query with wildmatch function

Hi,

can anyone help me with a widmatch function?

I am using this expression in a ListBox:

=if(wildmatch(Narrative,'Goods*')>0,'Goods Received',Narrative)

What i want to do is use this expression but when StockQty is greater than ZERO (>0)

Then i want to use a simular expression...

=if(wildmatch(Narrative,'Goods*')>0,'Goods Returned',Narrative)

but when StockQty is less than ZERO (<0)

So what i want to end up with is a List Box displaying 2 description:

Goods Received (which will show all positive values)

Goods Returned (which will show all negative values)

Can anyone tell me how i can do this please?

1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

may be you require this

if(wildmatch(Narraative,'Good*') and StockQty >0,'Good recieved',

if(wildmatch(Narraative,'Good*') and StockQty <0,'Good Return'))

see the attached file

Sunil Chauhan

View solution in original post

7 Replies
SunilChauhan
Champion II
Champion II

may be you require this

if(wildmatch(Narraative,'Good*') and StockQty >0,'Good recieved',

if(wildmatch(Narraative,'Good*') and StockQty <0,'Good Return'))

see the attached file

Sunil Chauhan
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Thats excellebt, thanks very much

I have another question tho in regards to the Wildmatch function..

How would i set an action to select any 'Goods*' narrative?

What i want is when the user clicks on a Goods Received button, any narratived with 'Goods*' will be selected.

I have tried using the SELECT IN FIELD option, and choosing Narrative for the field, and the search string....

=WildMatch(Narrative,'Goods*')
but i can't get it to work, What am i doing wrong?

SunilChauhan
Champion II
Champion II

i belieeve no need to set an action to select

if you apply on ur data properly then it will select all good * when seleect Goods Received

u can also select from list box

or else share the sample

Sunil Chauhan
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Hi, yes i know that, but i want the user to make as little selections as possible. My app shows not only goods received, it shows :

Goods received

Wastage

Reductions

Stock Checking

Stock Variances

Each reason has its own page, so when the user click on the Goods received page i want it to automatically select all narratives for 'Goods*'. Then the user only has 2 option to choose from:

Goods received

Goods Returned.

Thanks

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Please see attached

SunilChauhan
Champion II
Champion II

hello

i am not know how  to write action on button

but you can cheeck this using a list box

see the attached file

meanwhile i looking into action

Sunil Chauhan
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

Thanks, but thats not what i want. I want the button to select it. But thanks for your help.

I'll start another discussion..