<?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 Create an open file button using a variable. in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Create-an-open-file-button-using-a-variable/m-p/9927#M9699</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a report that generates several graphs and saves the raw data tables used for each graph as a file a using a different variable as part of the naming convention.&lt;/P&gt;&lt;P&gt;I want to add a button to each graph so that you can open the raw data.Is there a way to create a button that will open the raw data table using the previously saved file path.&lt;/P&gt;&lt;P&gt;I have used the code below to succesfully save the files and create the buttons but the file path always uses the last instance of the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose i was hoping when it created the button it would actually point to the correct file path/write the correct file path. Is this even possible or am i a few sandwichs short of a picnic! &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.jmp.com/7.0.1.0/images/emoticons/happy.png"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any advice.....&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;(temp&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; save&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"\\filepath\File_"&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;variable&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"report.txt"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Data_button &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;V List Box&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;( &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;Button Box&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;(&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"OPEN RAW DATA&amp;nbsp; "&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;variable&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;open&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;(&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"\\filepath\File_"&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;variable&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"report.txt&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;STRONG&gt;)))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data_button &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;journal&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Oct 2014 00:20:09 GMT</pubDate>
    <dc:creator>lenny</dc:creator>
    <dc:date>2014-10-25T00:20:09Z</dc:date>
    <item>
      <title>Create an open file button using a variable.</title>
      <link>https://community.jmp.com/t5/Discussions/Create-an-open-file-button-using-a-variable/m-p/9927#M9699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a report that generates several graphs and saves the raw data tables used for each graph as a file a using a different variable as part of the naming convention.&lt;/P&gt;&lt;P&gt;I want to add a button to each graph so that you can open the raw data.Is there a way to create a button that will open the raw data table using the previously saved file path.&lt;/P&gt;&lt;P&gt;I have used the code below to succesfully save the files and create the buttons but the file path always uses the last instance of the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suppose i was hoping when it created the button it would actually point to the correct file path/write the correct file path. Is this even possible or am i a few sandwichs short of a picnic! &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.jmp.com/7.0.1.0/images/emoticons/happy.png"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any advice.....&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;(temp&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; save&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"\\filepath\File_"&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;variable&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"report.txt"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Data_button &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;V List Box&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;( &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;Button Box&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;(&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"OPEN RAW DATA&amp;nbsp; "&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;variable&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;open&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;(&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"\\filepath\File_"&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;variable&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"report.txt&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;STRONG&gt;)))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data_button &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;journal&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Oct 2014 00:20:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-an-open-file-button-using-a-variable/m-p/9927#M9699</guid>
      <dc:creator>lenny</dc:creator>
      <dc:date>2014-10-25T00:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create an open file button using a variable.</title>
      <link>https://community.jmp.com/t5/Discussions/Create-an-open-file-button-using-a-variable/m-p/9928#M9700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's one approach.&amp;nbsp; &lt;STRONG&gt;Expr&lt;/STRONG&gt;( ... ) marks the value you need to cast in stone when the button is created.&amp;nbsp; &lt;STRONG&gt;Eval Expr&lt;/STRONG&gt;( ... ) searches for Expr and evaluates it; the result in this example is the expression &lt;EM&gt;Button Box( "press", Show( "path\ right \ext" ) ).&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/EM&gt; &lt;STRONG&gt;Eval&lt;/STRONG&gt;( ... ) evaluates the Button Box expression.&amp;nbsp; All three are needed and work together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;x = "right";&lt;/P&gt;&lt;P&gt;New Window( "test", Eval( Eval Expr( Button Box( "press", (Show( Expr( "path\ " || x || " \ext" ) )) ) ) ) );&lt;/P&gt;&lt;P&gt;x = "wrong";&lt;/P&gt;&lt;P&gt;Print( "test the button" );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7488_buttonScript.PNG" style="width: 376px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/934iF145A5E3BA475F2F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7488_buttonScript.PNG" alt="7488_buttonScript.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your example might look like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data_button = V List Box(&lt;/P&gt;&lt;P&gt;&amp;nbsp; Eval(&amp;nbsp; Eval Expr( Button Box( "OPEN RAW DATA&amp;nbsp; " || variable || "",&lt;/P&gt;&lt;P&gt;&amp;nbsp; Open( Expr( "\filepath\File_" || variable || "report.txt" ) )&amp;nbsp; )&amp;nbsp; )&amp;nbsp; )&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Open is not inside the expr; you don't want to do the open until the button is pressed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Button Box doesn't evaluate its script until you press the button.&amp;nbsp; This is one way you can build the button script with the file name already cast in stone, not in a variable, so when the script does run the variable isn't needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 21:56:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-an-open-file-button-using-a-variable/m-p/9928#M9700</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2016-10-18T21:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create an open file button using a variable.</title>
      <link>https://community.jmp.com/t5/Discussions/Create-an-open-file-button-using-a-variable/m-p/9929#M9701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You Sir are an absolute legend!!! Thank you so much for that it is exactly what i neeeded.&lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_macro_emoticon jive_emote" src="https://community.jmp.com/7.0.1.0/images/emoticons/happy.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Oct 2014 05:16:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-an-open-file-button-using-a-variable/m-p/9929#M9701</guid>
      <dc:creator>lenny</dc:creator>
      <dc:date>2014-10-25T05:16:40Z</dc:date>
    </item>
  </channel>
</rss>

