<?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 JSL help: Report column sorting and Fixed Dec formatting in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-help-Report-column-sorting-and-Fixed-Dec-formatting/m-p/434256#M68403</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I'm working on a code from another thread (if interested, you can read on it &lt;A href="https://community.jmp.com/t5/Discussions/JSL-Help-with-Get-As-Report-amp-Table-Box/m-p/433697#M68339" target="_self"&gt;here &lt;/A&gt;and &lt;A href="https://community.jmp.com/t5/Discussions/Adding-penalties-to-number-of-splits-in-Partition-platform-to/m-p/433144#M68284" target="_self"&gt;here&lt;/A&gt;), but stuck with another modification I'm trying to implement for a larger part of code. [NOTE: turns out it's just item 2, but I wanted to keep the subject of item 1 in there in case other interested readers might want to know.]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Anyway, here are the two things I need help with:&lt;/P&gt;&lt;P&gt;1. I'm having difficulty formatting the columns in the report table box I generate. I tried sending the command &amp;lt;&amp;lt;Format("Fixed Dec", 6, 4) to either the Get As Report call or the Table Box() environment, but neither seem to accept the Format() call. I'd like to set it to something like a width of 6 and 4 decimal places. The output I am working with is below, the code that generated this can be found from the first link above (I just don't want to double-post). Am I not going down enough levels?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update: while writing this, my question I posed at the end prompted me to try going down one more level to each column of interest and then use the &amp;lt;&amp;lt; Set Format() send command and it worked. I could loop through columns of the report and set the formats as desired. I used the following JSL code for that.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;For( ri = 1, ri &amp;lt;= N Col( dt_results ) - 2, ri++,
		dt_tb[Table Box( 1 )][Number Col Box( ri + 1 )] &amp;lt;&amp;lt; Set Format( "Fixed Dec", 6, 4 )
	);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiedrichSchmidt_0-1636400307577.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37413i0E492A94927BCA42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DiedrichSchmidt_0-1636400307577.png" alt="DiedrichSchmidt_0-1636400307577.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiedrichSchmidt_3-1636401444848.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37416iBCCECEE146630A63/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DiedrichSchmidt_3-1636401444848.png" alt="DiedrichSchmidt_3-1636401444848.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;2. The other thing I'd like to do is set several of the columns to be "sortable". What I mean by this is to give the column in the report table box (above screenshot) the little carat "^" or "˅" so the user can sort the report table box by a column of their choosing. This option is available in the XGBoost platform, see screenshot below, where the Train RSquare column has a "˅" next to it. The Response Screening platform also has this capability, see last screenshot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiedrichSchmidt_1-1636400637007.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37414i7C727D227E0F0E28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DiedrichSchmidt_1-1636400637007.png" alt="DiedrichSchmidt_1-1636400637007.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiedrichSchmidt_2-1636400758707.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37415i1C85CDBB2B538C65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DiedrichSchmidt_2-1636400758707.png" alt="DiedrichSchmidt_2-1636400758707.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So, this turns out to have only one request for help -- item 2. Any feedback is much appreciated, thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 18:04:45 GMT</pubDate>
    <dc:creator>SDF1</dc:creator>
    <dc:date>2023-06-09T18:04:45Z</dc:date>
    <item>
      <title>JSL help: Report column sorting and Fixed Dec formatting</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-help-Report-column-sorting-and-Fixed-Dec-formatting/m-p/434256#M68403</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I'm working on a code from another thread (if interested, you can read on it &lt;A href="https://community.jmp.com/t5/Discussions/JSL-Help-with-Get-As-Report-amp-Table-Box/m-p/433697#M68339" target="_self"&gt;here &lt;/A&gt;and &lt;A href="https://community.jmp.com/t5/Discussions/Adding-penalties-to-number-of-splits-in-Partition-platform-to/m-p/433144#M68284" target="_self"&gt;here&lt;/A&gt;), but stuck with another modification I'm trying to implement for a larger part of code. [NOTE: turns out it's just item 2, but I wanted to keep the subject of item 1 in there in case other interested readers might want to know.]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Anyway, here are the two things I need help with:&lt;/P&gt;&lt;P&gt;1. I'm having difficulty formatting the columns in the report table box I generate. I tried sending the command &amp;lt;&amp;lt;Format("Fixed Dec", 6, 4) to either the Get As Report call or the Table Box() environment, but neither seem to accept the Format() call. I'd like to set it to something like a width of 6 and 4 decimal places. The output I am working with is below, the code that generated this can be found from the first link above (I just don't want to double-post). Am I not going down enough levels?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update: while writing this, my question I posed at the end prompted me to try going down one more level to each column of interest and then use the &amp;lt;&amp;lt; Set Format() send command and it worked. I could loop through columns of the report and set the formats as desired. I used the following JSL code for that.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;For( ri = 1, ri &amp;lt;= N Col( dt_results ) - 2, ri++,
		dt_tb[Table Box( 1 )][Number Col Box( ri + 1 )] &amp;lt;&amp;lt; Set Format( "Fixed Dec", 6, 4 )
	);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiedrichSchmidt_0-1636400307577.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37413i0E492A94927BCA42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DiedrichSchmidt_0-1636400307577.png" alt="DiedrichSchmidt_0-1636400307577.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiedrichSchmidt_3-1636401444848.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37416iBCCECEE146630A63/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DiedrichSchmidt_3-1636401444848.png" alt="DiedrichSchmidt_3-1636401444848.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;2. The other thing I'd like to do is set several of the columns to be "sortable". What I mean by this is to give the column in the report table box (above screenshot) the little carat "^" or "˅" so the user can sort the report table box by a column of their choosing. This option is available in the XGBoost platform, see screenshot below, where the Train RSquare column has a "˅" next to it. The Response Screening platform also has this capability, see last screenshot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiedrichSchmidt_1-1636400637007.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37414i7C727D227E0F0E28/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DiedrichSchmidt_1-1636400637007.png" alt="DiedrichSchmidt_1-1636400637007.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DiedrichSchmidt_2-1636400758707.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/37415i1C85CDBB2B538C65/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DiedrichSchmidt_2-1636400758707.png" alt="DiedrichSchmidt_2-1636400758707.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; So, this turns out to have only one request for help -- item 2. Any feedback is much appreciated, thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:04:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-help-Report-column-sorting-and-Fixed-Dec-formatting/m-p/434256#M68403</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2023-06-09T18:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: JSL help: Report column sorting and Fixed Dec formatting</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-help-Report-column-sorting-and-Fixed-Dec-formatting/m-p/434305#M68407</link>
      <description>&lt;P&gt;Hi, You can send the table box a &amp;lt;&amp;lt;set click sort message, as below. At first, you will not see the "sort" carat icon, as you've got to click on a column header first. Then, clicking will cycle among ascending sort, descending sort, and original order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;Brady&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);

nw = new window("xx", 
	vlistbox(
		tablebox(
			nb1 = number col box("C1", [3,1,2]),
			nb2 = number col box("C2", [2,1,3]),
			&amp;lt;&amp;lt;set click sort
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Nov 2021 21:29:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-help-Report-column-sorting-and-Fixed-Dec-formatting/m-p/434305#M68407</guid>
      <dc:creator>brady_brady</dc:creator>
      <dc:date>2021-11-08T21:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: JSL help: Report column sorting and Fixed Dec formatting</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-help-Report-column-sorting-and-Fixed-Dec-formatting/m-p/434466#M68419</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3552"&gt;@brady_brady&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks for the feedback, that was exactly what I was hoping to get for the sort functionality, thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 14:18:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-help-Report-column-sorting-and-Fixed-Dec-formatting/m-p/434466#M68419</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2021-11-09T14:18:57Z</dc:date>
    </item>
  </channel>
</rss>

