<?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: Scripting, specifically to automate graphing of data for the last 30 days in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/526836#M75079</link>
    <description>&lt;P&gt;Has a Lock been placed on the Date column, or is the Date column being used to set values in other columns through formulas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The new column, JMPDate should be being created correctly.&amp;nbsp; You can use that column for the selection, etc.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 00:38:24 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2022-07-27T00:38:24Z</dc:date>
    <item>
      <title>Scripting, specifically to automate graphing of data for the last 30 days</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/524137#M74877</link>
      <description>&lt;P&gt;Novice on scripting, using JMP 16, looking for help to graph, the last 30 days of data - from today's date.&lt;/P&gt;&lt;P&gt;Currently using local data filter and selecting points, but there must be a better way to add this to the script, please advise.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Local Data Filter(
		Auto clear( 1 ),
		Add Filter(
			columns( :Recipe, :Date ),
			Where(
				:Date == {"220509", "220511", "220513", "220516", "220517", "220524",
				"220526", "220531", "220602", "220608", "220613", "220614", "220616",
				"220620", "220621", "220713", "220718", "220719"}
			),
			Display( :Recipe, N Items( 15 ) ),
			Display( :Date, N Items( 15 ), Find( Set Text( "" ) ) )
		)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:04:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/524137#M74877</guid>
      <dc:creator>VO</dc:creator>
      <dc:date>2023-06-09T17:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting, specifically to automate graphing of data for the last 30 days</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/524143#M74879</link>
      <description>&lt;P&gt;To start, I suggest that you convert your Date column to a JMP Date/Time value.&amp;nbsp; The current Date column is just a character column, which follows Alphanumeric rules, not Date/Time rules. Here is a simple script that will create a new column called JMPDate, whch&amp;nbsp; will be transformed from your Date column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

dt &amp;lt;&amp;lt; New Column( "JMPDate",
	set each value(
		Date MDY(
			Num( Substr( :date, 3, 2 ) ),
			Num( Right( :date, 2 ) ), 
			Num( "20" || Left( :date, 2 ) )
		)
	),
	Format( "m/d/y" )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Once it is a JMP Date/Time column, you can do such things as&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; select where(:JMPDate &amp;gt; 05/31/2022);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; select where(:JMPDate &amp;gt; Today() - inDays(180));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Jul 2022 22:07:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/524143#M74879</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-20T22:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting, specifically to automate graphing of data for the last 30 days</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/526812#M75074</link>
      <description>&lt;P&gt;Thanks for the help "txnelson," but not an easy fix, since it appears that perhaps I worded the question wrong or incomplete.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Date column is being created / sourced from the name column, which is the output file from the tool, that encompasses a description of several characteristics specific to the run, in this manner: "Date_tool Id_ recipe_ material_position_run#."&amp;nbsp; That said, since the source of this original column is set to Character, the newly created "Date" column (done for ease of plotting) will not accept the change from Character to Date. Any idea why? Or better suggestion for the Date column formula?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Item( 1, :Source, "_" )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Jul 2022 21:19:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/526812#M75074</guid>
      <dc:creator>VO</dc:creator>
      <dc:date>2022-07-26T21:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting, specifically to automate graphing of data for the last 30 days</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/526836#M75079</link>
      <description>&lt;P&gt;Has a Lock been placed on the Date column, or is the Date column being used to set values in other columns through formulas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The new column, JMPDate should be being created correctly.&amp;nbsp; You can use that column for the selection, etc.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 00:38:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/526836#M75079</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-27T00:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting, specifically to automate graphing of data for the last 30 days</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/527076#M75097</link>
      <description>&lt;P&gt;I think that is the problem, the column is locked automatically, so it does not take the Date change. Also, no&amp;nbsp;other columns are dependent on this Date column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attempted to recreate a new column, with the same Formula, and as soon as the formula is applied it locks that column as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 15:23:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/527076#M75097</guid>
      <dc:creator>VO</dc:creator>
      <dc:date>2022-07-27T15:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting, specifically to automate graphing of data for the last 30 days</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/527160#M75106</link>
      <description>&lt;P&gt;Click on the red triangle in the Table Panel and unselect the Lock Table setting&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 17:34:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/527160#M75106</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-27T17:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting, specifically to automate graphing of data for the last 30 days</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/527163#M75107</link>
      <description>&lt;P&gt;The "Lock Data Table" was not selected. I tried unlocking the column with and without the selection, and neither worked.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 17:40:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/527163#M75107</guid>
      <dc:creator>VO</dc:creator>
      <dc:date>2022-07-27T17:40:47Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting, specifically to automate graphing of data for the last 30 days</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/527170#M75108</link>
      <description>&lt;P&gt;How is the table created?&amp;nbsp; The platform that is used to create the table, many times has an option to link/lock the new table.&amp;nbsp; If so, change the linking in the table creation.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 17:43:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/527170#M75108</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-27T17:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting, specifically to automate graphing of data for the last 30 days</title>
      <link>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/527180#M75110</link>
      <description>&lt;P&gt;(Apologies to &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;because I left the discussion window open from earlier and did not see his reply.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let's start over. I would add a data column for the converted date value (numeric) and leave the original date value (character) as it is. So the data table now might look like this:&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="table.PNG" style="width: 721px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44381iDF001469D49EA90B/image-size/large?v=v2&amp;amp;px=999" role="button" title="table.PNG" alt="table.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The New Date column is numeric values formatted as dates. See this dialog to understand the attributes of the new data column:&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="dialog.PNG" style="width: 513px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44382iCAF2C01D7446B682/image-size/large?v=v2&amp;amp;px=999" role="button" title="dialog.PNG" alt="dialog.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A simple formula deconstructs the original character string to build a proper JMP time value:&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="formula.PNG" style="width: 716px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44383i0F799E1D49B173E6/image-size/large?v=v2&amp;amp;px=999" role="button" title="formula.PNG" alt="formula.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now use New Date for your filter instead of Date. It doesn't matter about whether the column is locked.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 17:58:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Scripting-specifically-to-automate-graphing-of-data-for-the-last/m-p/527180#M75110</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2022-07-27T17:58:05Z</dc:date>
    </item>
  </channel>
</rss>

