<?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 do i change column format in JSL or deal with the Send Expects Scriptable Object error in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108471#M39472</link>
    <description>That worked like a champ, so column number is the correct syntax not column name. Bah, i should have been able to figure that out.&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
    <pubDate>Thu, 31 Jan 2019 18:14:25 GMT</pubDate>
    <dc:creator>flemingtb</dc:creator>
    <dc:date>2019-01-31T18:14:25Z</dc:date>
    <item>
      <title>How do i change column format in JSL or deal with the Send Expects Scriptable Object error</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108458#M39461</link>
      <description>&lt;P&gt;I am working on joining (2) tables in a JSL script.&amp;nbsp; The issue i'm having is with saving the newly joined tables.&amp;nbsp; There are (2) issues.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first issue is that the Data columns of (Test2) are coming in to JMP as Character/Nominal and need to be Numeric/Continuous.&amp;nbsp; When i change or create the Excel spreadsheet column format to numeric i get the following error at the dt3 &amp;lt;&amp;lt;save as line of code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Send Expects Scriptable Object in access or evaluation of 'Send' , dt3 &amp;lt;&amp;lt; /*###*/save as("B:\JoinTest1_2.jmp") /*###*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i try to format the JMP data table column format in JSL i get the same error during the save as instruction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have searched this for hours and just cant figure it out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code.&amp;nbsp; Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt1 = open("B:\Test1.jmp");
dt2 = Open("B:\Test2.jmp",
	Worksheets( "WorkSheet1" ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 1 ),
		Headers Start on Row( 1 ),
		Data Starts on Row( 2 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 0 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( "-" )
	)
);
column(dt2,"Column1") &amp;lt;&amp;lt; data type(Numeric)&amp;lt;&amp;lt;Modeling Type(Continuous)&amp;lt;&amp;lt;Format(Best,12);
column(dt2,"Column2") &amp;lt;&amp;lt; data type(Numeric)&amp;lt;&amp;lt;Modeling Type(Continuous)&amp;lt;&amp;lt;Format(Best,12);
column(dt2,"Column3") &amp;lt;&amp;lt; data type(Numeric)&amp;lt;&amp;lt;Modeling Type(Continuous)&amp;lt;&amp;lt;Format(Best,12);
column(dt2,"Column4") &amp;lt;&amp;lt; data type(Numeric)&amp;lt;&amp;lt;Modeling Type(Continuous)&amp;lt;&amp;lt;Format(Best,12);

dt3 = Data Table( dt1 ) &amp;lt;&amp;lt; Join(
	With( Data Table( dt2) ),
	By Matching Columns( :Column1 ),
	Drop multiples( 0, 0 ),
	Include Nonmatches( 1, 0 ),
	Preserve main table order( 1 ),
);

Close (dt1, no save);
Close (dt2, no save);

//dt3 &amp;lt;&amp;lt; select where(:Sample ID ==0);
//dt3 &amp;lt;&amp;lt; delete rows();
dt3 &amp;lt;&amp;lt; save as ("B:\JoinTest1_2")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Jan 2019 15:54:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108458#M39461</guid>
      <dc:creator>flemingtb</dc:creator>
      <dc:date>2019-01-31T15:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do i change column format in JSL or deal with the Send Expects Scriptable Object error</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108463#M39465</link>
      <description>&lt;P&gt;There are a couple of issues that I see.&amp;nbsp; I am not sure if dt2 is opening a .jmp data table, or an Excel file.&amp;nbsp; You have specified that dt2 is a .jmp file, but have encluded Excel specifications.&lt;/P&gt;
&lt;P&gt;Next, the proper form of the "By Matching Columns" code should be :Column1 = :Column1........but as it is, if both columns exist in the data tables then there should not be an issue&lt;/P&gt;
&lt;P&gt;I have added in a couple of statements to ensure that the data table dt3 exists both before and after you close the data tables dt1 and dt2.&lt;/P&gt;
&lt;P&gt;Run the code and see what the JMP Log has printed out&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt1 = open("B:\Test1.jmp");
dt2 = Open("B:\Test2.jmp", // Is this a JMP table or an Excel..... the .jmp extension seems strange here
	Worksheets( "WorkSheet1" ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 1 ),
		Headers Start on Row( 1 ),
		Data Starts on Row( 2 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 0 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( "-" )
	)
);
column(dt2,"Column1") &amp;lt;&amp;lt; data type(Numeric)&amp;lt;&amp;lt;Modeling Type(Continuous)&amp;lt;&amp;lt;Format(Best,12);
column(dt2,"Column2") &amp;lt;&amp;lt; data type(Numeric)&amp;lt;&amp;lt;Modeling Type(Continuous)&amp;lt;&amp;lt;Format(Best,12);
column(dt2,"Column3") &amp;lt;&amp;lt; data type(Numeric)&amp;lt;&amp;lt;Modeling Type(Continuous)&amp;lt;&amp;lt;Format(Best,12);
column(dt2,"Column4") &amp;lt;&amp;lt; data type(Numeric)&amp;lt;&amp;lt;Modeling Type(Continuous)&amp;lt;&amp;lt;Format(Best,12);

dt3 = Data Table( dt1 ) &amp;lt;&amp;lt; Join(
	With( Data Table( dt2) ),
	By Matching Columns( :Column1 = :Column1 ),
	Drop multiples( 0, 0 ),
	Include Nonmatches( 1, 0 ),
	Preserve main table order( 1 ),
);

// Make sure it created the data table
show("before closes ", dt3);

Close (dt1, no save);
Close (dt2, no save);

// Make sure after the initial tables are closed that dt3 is still there
show("after closes ", dt3);

//dt3 &amp;lt;&amp;lt; select where(:Sample ID ==0);
//dt3 &amp;lt;&amp;lt; delete rows();
dt3 &amp;lt;&amp;lt; save as ("B:\JoinTest1_2");
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Jan 2019 17:19:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108463#M39465</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-01-31T17:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do i change column format in JSL or deal with the Send Expects Scriptable Object error</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108467#M39469</link>
      <description>Yes you are correct dt2 is an excel file, sorry this code is generic to what i'm doing with actual files.&lt;BR /&gt;&lt;BR /&gt;i do have two columns that have the same title (sample ID).&lt;BR /&gt;&lt;BR /&gt;The code performs the same way, when opening dt2 the data columns are not numeric/continuous and if i try to change the column parameters in the script i get the error above. How does JMP interpret excel data with a column header, could it be using the text in the column header to set the parameters?</description>
      <pubDate>Thu, 31 Jan 2019 17:55:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108467#M39469</guid>
      <dc:creator>flemingtb</dc:creator>
      <dc:date>2019-01-31T17:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do i change column format in JSL or deal with the Send Expects Scriptable Object error</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108468#M39470</link>
      <description>&lt;P&gt;I think I see the problem.&amp;nbsp; When you specify&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;column(dt2,"Column1") &amp;lt;&amp;lt; data type(Numeric)&amp;lt;&amp;lt;Modeling Type(Continuous)&amp;lt;&amp;lt;Format(Best,12);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;JMP is looking for a column named "Column1".....Yes....Excel will set column names from the Excel table, because it is specified in the definition of how to read the Excel file&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Has Column Headers( 1 )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So if you want to change the data type, etc. using the column position, you need to specify&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;column(dt2,1) &amp;lt;&amp;lt; data type(Numeric)&amp;lt;&amp;lt;Modeling Type(Continuous)&amp;lt;&amp;lt;Format(Best,12);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Jan 2019 18:07:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108468#M39470</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-01-31T18:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do i change column format in JSL or deal with the Send Expects Scriptable Object error</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108470#M39471</link>
      <description>Ok i've stumbled upon a partial solution, the spreadsheet for both dt1 and dt2 have both character data and numeric data, although both excel files are formatted as "General" in excel, for whatever reason the dt2 table doesn't like that and forced me to format the numeric columns as "number" data.&lt;BR /&gt;&lt;BR /&gt;So there is a work around, however i would like to know why the script doesn't seem to work when changing the parameters programatically.</description>
      <pubDate>Thu, 31 Jan 2019 18:09:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108470#M39471</guid>
      <dc:creator>flemingtb</dc:creator>
      <dc:date>2019-01-31T18:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do i change column format in JSL or deal with the Send Expects Scriptable Object error</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108471#M39472</link>
      <description>That worked like a champ, so column number is the correct syntax not column name. Bah, i should have been able to figure that out.&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Thu, 31 Jan 2019 18:14:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108471#M39472</guid>
      <dc:creator>flemingtb</dc:creator>
      <dc:date>2019-01-31T18:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: How do i change column format in JSL or deal with the Send Expects Scriptable Object error</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108472#M39473</link>
      <description>&lt;P&gt;I strongly suggest that you get in the habit in going to the Scripting Index to get the description of, and examples of the different functions you are using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;Scripting Index&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or to just get a description, once you type in a function name, with the starting "(" you can hover over the function name and it will display a description of the function&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 18:21:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-i-change-column-format-in-JSL-or-deal-with-the-Send/m-p/108472#M39473</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-01-31T18:21:06Z</dc:date>
    </item>
  </channel>
</rss>

