cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
buchea
Level I

Select Where evaluation using a variable

I'm having a strange issue when trying to use a variable in Select Where(). The following code works fine:

dt << Row Selection( Select Where( df:TestName != "pb" & df:BoType=="xxxx") );
Show(nrows(dt << get selected rows));

Prints in Log: Number of selected rows > 0 as expected.

 

But the following code fails completely:

sb="xxxx";
dt << Row Selection( Select Where( df:TestName != "pb" & df:BoType==sb) );
Show(nrows(dt << get selected rows));

Prints in Log: 0

 

I'm completely baffled. Any help would be greatly appreciated!

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Select Where evaluation using a variable

I'm pretty sure that I have done this action without trouble. Perhaps simplify the message.

 

sb="xxxx";
dt << Select Where( df:TestName != "pb" & df:BoType == sb);
Show(nrows(dt << get selected rows));

View solution in original post

2 REPLIES 2

Re: Select Where evaluation using a variable

I'm pretty sure that I have done this action without trouble. Perhaps simplify the message.

 

sb="xxxx";
dt << Select Where( df:TestName != "pb" & df:BoType == sb);
Show(nrows(dt << get selected rows));
buchea
Level I

Re: Select Where evaluation using a variable

This fixed it! Thank you!