<?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: Batch creation of journals based on spreadsheet entry in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Batch-creation-of-journals-based-on-spreadsheet-entry/m-p/453089#M69991</link>
    <description>&lt;P&gt;Below are some functions which should help you:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Use &lt;STRONG&gt;Pick File()&lt;/STRONG&gt; to get the file path to variable&lt;/LI&gt;&lt;LI&gt;Use &lt;STRONG&gt;dt = Open() &lt;/STRONG&gt;to open the path (might have to open first with interactive option to get proper source script if excel file is complicated) and save the reference to variable dt&lt;/LI&gt;&lt;LI&gt;Get the values from first column to a variable with some of the many options JMP has. Below are couple options, with the &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;assumption&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; that there are no duplicate values:&lt;OL&gt;&lt;LI&gt;var_list = &lt;STRONG&gt;dt[0,1]&lt;/STRONG&gt;;&lt;/LI&gt;&lt;LI&gt;var_list = &lt;STRONG&gt;Column(dt,1) &amp;lt;&amp;lt; get values&lt;/STRONG&gt;;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;If JMP16, use &lt;STRONG&gt;For Each()&lt;/STRONG&gt; to loop over list. If version before JMP16 use &lt;STRONG&gt;For&lt;/STRONG&gt; loop.&lt;/LI&gt;&lt;LI&gt;Perform operations inside the loop&lt;/LI&gt;&lt;LI&gt;Close datatable with &lt;STRONG&gt;Close(dt, nosave)&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;If you want to close also JMP, you can use &lt;STRONG&gt;Quit(no save)&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;To get user interface with OK (and Cancel) button, take a look at &lt;STRONG&gt;New Window()&lt;/STRONG&gt; with &lt;STRONG&gt;&amp;lt;&amp;lt; modal&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 18:24:37 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-01-21T18:24:37Z</dc:date>
    <item>
      <title>Batch creation of journals based on spreadsheet entry</title>
      <link>https://community.jmp.com/t5/Discussions/Batch-creation-of-journals-based-on-spreadsheet-entry/m-p/453068#M69986</link>
      <description>&lt;P&gt;I have a set of working JSL scripts which take user input (part ID, test date, test limits, file format etc), loads the test data (from a database for the entered parameters), plots the graphs etc and then passes all of them to journal which is then saved as PDF (while the test data is saved in user specified file format). Currently, this works only for one given set of user input&amp;nbsp;(part ID, test date, test limits, file format etc). As the partIDs change, the other user input parameters usually remain same.&lt;/P&gt;&lt;P&gt;In this view, I would like to change my script where the flow is&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A list, say an excel spreadsheet, consisting of part IDs is loaded via a dialog box (via File --&amp;gt;Open--&amp;gt;).&lt;/LI&gt;&lt;LI&gt;User presses a button, say an OK button and&amp;nbsp;one by one the part IDs are taken from the spreadsheet&amp;nbsp;and JMP does its work, saves the PDF (and data file) in user specified location and moves on to the next part ID until the end of the list.&lt;/LI&gt;&lt;LI&gt;A progress bar is displayed while the operations are underway.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Normally, I would do such a thing under a for loop but as I have only recently learnt JMP, I was wondering if there are functions already existing&amp;nbsp;which I could use rather than writing my own?&lt;/P&gt;&lt;P&gt;Can I request a simple example of a JSL script for creating a dialog&amp;nbsp;box for browsing an excel file, loading it and performing operation on each row (of the first column) and existing.&amp;nbsp;This should get me started (status bar can come in the next iteration).&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:09:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Batch-creation-of-journals-based-on-spreadsheet-entry/m-p/453068#M69986</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-06-09T18:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Batch creation of journals based on spreadsheet entry</title>
      <link>https://community.jmp.com/t5/Discussions/Batch-creation-of-journals-based-on-spreadsheet-entry/m-p/453089#M69991</link>
      <description>&lt;P&gt;Below are some functions which should help you:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Use &lt;STRONG&gt;Pick File()&lt;/STRONG&gt; to get the file path to variable&lt;/LI&gt;&lt;LI&gt;Use &lt;STRONG&gt;dt = Open() &lt;/STRONG&gt;to open the path (might have to open first with interactive option to get proper source script if excel file is complicated) and save the reference to variable dt&lt;/LI&gt;&lt;LI&gt;Get the values from first column to a variable with some of the many options JMP has. Below are couple options, with the &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;assumption&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; that there are no duplicate values:&lt;OL&gt;&lt;LI&gt;var_list = &lt;STRONG&gt;dt[0,1]&lt;/STRONG&gt;;&lt;/LI&gt;&lt;LI&gt;var_list = &lt;STRONG&gt;Column(dt,1) &amp;lt;&amp;lt; get values&lt;/STRONG&gt;;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;If JMP16, use &lt;STRONG&gt;For Each()&lt;/STRONG&gt; to loop over list. If version before JMP16 use &lt;STRONG&gt;For&lt;/STRONG&gt; loop.&lt;/LI&gt;&lt;LI&gt;Perform operations inside the loop&lt;/LI&gt;&lt;LI&gt;Close datatable with &lt;STRONG&gt;Close(dt, nosave)&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;If you want to close also JMP, you can use &lt;STRONG&gt;Quit(no save)&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;To get user interface with OK (and Cancel) button, take a look at &lt;STRONG&gt;New Window()&lt;/STRONG&gt; with &lt;STRONG&gt;&amp;lt;&amp;lt; modal&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 18:24:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Batch-creation-of-journals-based-on-spreadsheet-entry/m-p/453089#M69991</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-01-21T18:24:37Z</dc:date>
    </item>
  </channel>
</rss>

