<?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: Shift multiple rows selection 1 up JSL in Community Discussions</title>
    <link>https://community.jmp.com/t5/Community-Discussions/Shift-multiple-rows-selection-1-up-JSL/m-p/422235#M260</link>
    <description>&lt;P&gt;This will require some additional error check for 0 row which depends how you want to handle it (do you want to loop it around for example):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(10),
	New Column("Column 1",
		Numeric,
		"Continuous",
		Format("Best", 12),
		Set Values([., ., ., ., ., ., ., ., ., .])
	),
	Set Row States([0, 0, 0, 0, 1, 0, 0, 0, 1, 1])
);
wait(1);
sel_rows = dt &amp;lt;&amp;lt; Get Selected Rows;
dt &amp;lt;&amp;lt; Clear Select;
dt &amp;lt;&amp;lt; Select Rows(sel_rows - 1);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or you could possibly use row states.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;With row states it could be something like this (only works this way if Selection/no state are only row states):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Set Row States((dt &amp;lt;&amp;lt; Get Row States)[2::NRows(dt)] |/ [0]);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 Sep 2021 20:02:06 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-09-29T20:02:06Z</dc:date>
    <item>
      <title>Shift multiple rows selection 1 up JSL</title>
      <link>https://community.jmp.com/t5/Community-Discussions/Shift-multiple-rows-selection-1-up-JSL/m-p/422185#M259</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my first post!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to shift the rows selection 1 up in JSL?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: selected rows are 5,9,10&lt;/P&gt;&lt;P&gt;shift selection up will select rows 4,8,9&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is done is VS as follows:&lt;/P&gt;&lt;P&gt;Sub moveselection()&lt;BR /&gt;Selection.Offset(1, 0).Select&lt;BR /&gt;End Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 18:01:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Community-Discussions/Shift-multiple-rows-selection-1-up-JSL/m-p/422185#M259</guid>
      <dc:creator>EMDLEB</dc:creator>
      <dc:date>2021-09-29T18:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Shift multiple rows selection 1 up JSL</title>
      <link>https://community.jmp.com/t5/Community-Discussions/Shift-multiple-rows-selection-1-up-JSL/m-p/422235#M260</link>
      <description>&lt;P&gt;This will require some additional error check for 0 row which depends how you want to handle it (do you want to loop it around for example):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(10),
	New Column("Column 1",
		Numeric,
		"Continuous",
		Format("Best", 12),
		Set Values([., ., ., ., ., ., ., ., ., .])
	),
	Set Row States([0, 0, 0, 0, 1, 0, 0, 0, 1, 1])
);
wait(1);
sel_rows = dt &amp;lt;&amp;lt; Get Selected Rows;
dt &amp;lt;&amp;lt; Clear Select;
dt &amp;lt;&amp;lt; Select Rows(sel_rows - 1);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or you could possibly use row states.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;With row states it could be something like this (only works this way if Selection/no state are only row states):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Set Row States((dt &amp;lt;&amp;lt; Get Row States)[2::NRows(dt)] |/ [0]);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Sep 2021 20:02:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Community-Discussions/Shift-multiple-rows-selection-1-up-JSL/m-p/422235#M260</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-09-29T20:02:06Z</dc:date>
    </item>
  </channel>
</rss>

