<?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: get rows in between characters from a column then move other column value (selected row only) to other column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866870#M102956</link>
    <description>&lt;P&gt;but the purpose is for daily automation and the rows between the start and values can change from time to time.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Apr 2025 16:51:32 GMT</pubDate>
    <dc:creator>dadawasozo</dc:creator>
    <dc:date>2025-04-08T16:51:32Z</dc:date>
    <item>
      <title>get rows in between characters from a column then move other column value (selected row only) to other column</title>
      <link>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866858#M102954</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to move or copy paste multiple column value of selected rows to other columns in the same table like picture below&lt;/P&gt;
&lt;P&gt;the interested rows are always start from :Item == "start" until&amp;nbsp;:Item == "values", but the total rows can be different. I want to copy paste or move value in Col1 and Col2 of the interested rows to Col 3 and Col 4. My current thought is to manually create a list that include the string from start to values under :Item then create a column to label as "1" if :Item contains list. from there set the Col 3 == Col 1 and Col 4 = Col 2.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, the rows between start and values can be different. I wonder if anyone know better method to do the task without the need of manually create the list, but based on the "start" and "values" to find the rows.&lt;BR /&gt;original table&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dadawasozo_0-1744129588431.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/74675i109E8ED0BB1EC87A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dadawasozo_0-1744129588431.png" alt="dadawasozo_0-1744129588431.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;after moved&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dadawasozo_1-1744129629132.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/74676iED39223980AC92DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dadawasozo_1-1744129629132.png" alt="dadawasozo_1-1744129629132.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 16:38:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866858#M102954</guid>
      <dc:creator>dadawasozo</dc:creator>
      <dc:date>2025-04-08T16:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: get rows in between characters from a column then move other column value (selected row only) to other column</title>
      <link>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866869#M102955</link>
      <description>&lt;P&gt;I suspect it would be easier to manually do the cut and paste rather than having to create start and stop lists.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 16:49:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866869#M102955</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-04-08T16:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: get rows in between characters from a column then move other column value (selected row only) to other column</title>
      <link>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866870#M102956</link>
      <description>&lt;P&gt;but the purpose is for daily automation and the rows between the start and values can change from time to time.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 16:51:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866870#M102956</guid>
      <dc:creator>dadawasozo</dc:creator>
      <dc:date>2025-04-08T16:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: get rows in between characters from a column then move other column value (selected row only) to other column</title>
      <link>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866882#M102958</link>
      <description>&lt;P&gt;Then I would make it as straight forward as possible and create a config table something like&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1744132577546.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/74677i304365A0D2E458DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1744132577546.png" alt="txnelson_0-1744132577546.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Which makes your JSL pretty simple, something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
dtConfig = Data Table( "Config" );

For( i = 1, i &amp;lt;= N Rows( dtConfig ), i++,
	frCol = dtConfig:From Column[i];
	toCol = dtConfig:To Column[i];
	For( k = dtConfig:Start Row[i], k &amp;lt;= dtConfig:End Row[i], k++,
		Column( dt:toCol )[k] = Column( dt, FromCol )[k];
		If( dtConfig:Move_Copy == "Move",
			Column( dt, FromCol ) = ""
		);
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Apr 2025 17:17:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866882#M102958</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2025-04-08T17:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: get rows in between characters from a column then move other column value (selected row only) to other column</title>
      <link>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866921#M102960</link>
      <description>&lt;P&gt;I think you can safely do it without a config table.&amp;nbsp; This checks to make sure that Col 1 contains a value in the "start" row before overwriting anything.&amp;nbsp; Yes, I like using For Each().&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 );
starts = Loc( dt:Item &amp;lt;&amp;lt; Get Values, "start" );
ends = Loc( dt:Item &amp;lt;&amp;lt; Get Values, "values" );
For Each( {v, i}, starts,
	If( :Col 1[v] != "",
		For Each( {val, idx}, v :: ends[i],
			:Col 3[val] = :Col 1[val];
			:Col 4[val] = :Col 2[val];
			:Col 1[val] = "";
			:Col 2[val] = "";
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Apr 2025 17:54:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/get-rows-in-between-characters-from-a-column-then-move-other/m-p/866921#M102960</guid>
      <dc:creator>mmarchandFSLR</dc:creator>
      <dc:date>2025-04-08T17:54:30Z</dc:date>
    </item>
  </channel>
</rss>

