Choose Language Hide Translation Bar
Highlighted
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
Highlighted

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));
Learn it once, use it forever!

View solution in original post

2 REPLIES 2
Highlighted

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));
Learn it once, use it forever!

View solution in original post

Highlighted
buchea
Level I

Re: Select Where evaluation using a variable

This fixed it! Thank you!
Article Labels