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==<STRONG><FONT color="#800000">"xxxx"</FONT></STRONG>) );
Show(nrows(dt << get selected rows));
Prints in Log: Number of selected rows > 0 as expected.
But the following code fails completely:
<STRONG><FONT color="#800000">sb="xxxx"</FONT></STRONG>;
dt << Row Selection( Select Where( df:TestName != "pb" & df:BoType==<STRONG><FONT color="#800000">sb</FONT></STRONG>) );
Show(nrows(dt << get selected rows));
Prints in Log: 0
I'm completely baffled. Any help would be greatly appreciated!
</CODE></P><P> </P></LINGO-BODY><LINGO-LABS id="lingo-labs-276602" slang="en-US" mode="NONE"><LINGO-LABEL>Scripting</LINGO-LABEL></LINGO-LABS><LINGO-SUB id="lingo-sub-276614" slang="en-US" mode="NONE">Re: Select Where evaluation using a variable</LINGO-SUB><LINGO-BODY id="lingo-body-276614" slang="en-US" mode="NONE">This fixed it! Thank you!</LINGO-BODY><LINGO-SUB id="lingo-sub-276612" slang="en-US" mode="NONE">Re: Select Where evaluation using a variable</LINGO-SUB><LINGO-BODY id="lingo-body-276612" slang="en-US" mode="NONE"><P>I'm pretty sure that I have done this action without trouble. Perhaps simplify the message.</P>
<P> </P>
<PRE><CODE class=" language-jsl">sb="xxxx";
dt << Select Where( df:TestName != "pb" & df:BoType == sb);
Show(nrows(dt << get selected rows));