<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to replace double quotes in string in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-replace-double-quotes-in-string/m-p/40777#M23818</link>
    <description>&lt;P&gt;Eval( Parse( Eval Insert( will get you out of trouble when you are really stuck but should be a last resort as the code is hard to debug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically you are inserting your string as text into the desired JSL and than evaluating the JSL.&amp;nbsp;The ^^ tells the Insert Command where to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Eval( Parse( Eval Insert("\[&amp;nbsp;dt_Inp &amp;lt;&amp;lt; New Column("Status_Inv",Numeric,Continuous,Formula(^Stmt^)); ]\" ) ) );&lt;/PRE&gt;&lt;P&gt;This is called dynamic JSL which can be very powerful.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2017 08:29:27 GMT</pubDate>
    <dc:creator>stephen_pearson</dc:creator>
    <dc:date>2017-06-20T08:29:27Z</dc:date>
    <item>
      <title>How to replace double quotes in string</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-replace-double-quotes-in-string/m-p/40758#M23807</link>
      <description>&lt;P&gt;All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; This seems to be fairly simple but extremely frustrating task . How do I replace quotation marks in a string .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Let us say , I have the following columns ( Inv 01 , Inv 02 ... Inv 26) .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; So, I acquired the column names and built a condition like so :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Stmt = "";
for(i = 1, i &amp;lt;= N Items(InvColNames), i++,
        If(i == 1,
               Stmt = ":" || InvColNames[i] || " &amp;gt;= 1 &amp;amp;" || ":" || InvColNames[i] || " &amp;lt;= InvLimit" ;
	       ,
               Stmt = Stmt || " &amp;amp; " || ":" || InvColNames[i] || "&amp;gt;= 1 &amp;amp;" || ":" || InvColNames[i] || " &amp;lt;= InvLimit"  ; 
          ) ;
    );
":Inv 01 &amp;gt;= 1 &amp;amp;:Inv 01 &amp;lt;= InvLimit &amp;amp; :Inv 02&amp;gt;= 1 &amp;amp;:Inv 02 &amp;lt;= InvLimit &amp;amp; :Inv 03&amp;gt;= 1 &amp;amp;:Inv 03 &amp;lt;= InvLimit" &lt;/PRE&gt;&lt;PRE&gt;Stmt = Substitute(Stmt, "\!"", ""); 
InvStatusExpr = Expr(dt_Inp &amp;lt;&amp;lt; New Column("Status_Inv",Numeric,Continuous,Formula(Expr(Stmt))));
Eval(Eval Expr(InvStatusExpr));&lt;/PRE&gt;&lt;P&gt;I wish to them use the condition I built as an expression and define a condition . The problem though is in its current form , since the "Stmt" I built is enveloped in double quotes, it is being evaluated as a string and the statement I built is being populated into the new column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone can show me a simple way to replace double quotes in a string and get this to work , I would appreciate the help .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6-19-2017 3-41-33 PM.png" style="width: 282px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/6508i91BE0C39F5B10BF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="6-19-2017 3-41-33 PM.png" alt="6-19-2017 3-41-33 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best&amp;nbsp;&lt;/P&gt;&lt;P&gt;Uday&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2017 22:42:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-replace-double-quotes-in-string/m-p/40758#M23807</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2017-06-19T22:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace double quotes in string</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-replace-double-quotes-in-string/m-p/40777#M23818</link>
      <description>&lt;P&gt;Eval( Parse( Eval Insert( will get you out of trouble when you are really stuck but should be a last resort as the code is hard to debug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically you are inserting your string as text into the desired JSL and than evaluating the JSL.&amp;nbsp;The ^^ tells the Insert Command where to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Eval( Parse( Eval Insert("\[&amp;nbsp;dt_Inp &amp;lt;&amp;lt; New Column("Status_Inv",Numeric,Continuous,Formula(^Stmt^)); ]\" ) ) );&lt;/PRE&gt;&lt;P&gt;This is called dynamic JSL which can be very powerful.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2017 08:29:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-replace-double-quotes-in-string/m-p/40777#M23818</guid>
      <dc:creator>stephen_pearson</dc:creator>
      <dc:date>2017-06-20T08:29:27Z</dc:date>
    </item>
  </channel>
</rss>

