Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

use a variable in Wildmatch

Gents,

I want to create an index that I can use as a manner of search/lookup on user defined arguments...

The result now is a table with all arguments times number of records (to be looked up)... so everything is selected which is wrong.

Can anyone help me with this one?

Thx in advance

F.


try to implement the following code in my script:

Temp:
load
  max(#Nr) as maxrec
resident Argument;

let vMaxrec = num(peek('maxrec',0,'Temp'));
drop table Temp;

Set vSearch = peek('Argument', $(i)-1,'Argument');

FOR i = 1 to $(vMaxrec)                    // read arguments per record number from arguments table and create index
          Arg_Indx:

          LOAD Order_nmbr,

            if(WildMatch(Order_Description,'*'&$(vSearch)&'*'), $(i), 99999) as #Nr


          resident Orders
          ;
NEXT i
//

1 Solution

Accepted Solutions
SunilChauhan
Champion II
Champion II

keep

Set vSearch = peek('Argument', $(i)-1,'Argument');

after for loop

hope this helps

Sunil Chauhan

View solution in original post

2 Replies
SunilChauhan
Champion II
Champion II

keep

Set vSearch = peek('Argument', $(i)-1,'Argument');

after for loop

hope this helps

Sunil Chauhan
Not applicable
Author

Hi Sunil,

thx!!

Works fine now....

Regards

F.