<?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 Lock a column in script while working with multiple tables with same column names in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Lock-a-column-in-script-while-working-with-multiple-tables-with/m-p/767390#M94758</link>
    <description>&lt;P&gt;I have three tables I am working with in my JSL. I am calling these dt1, dt2, dt3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt1 has the columns A, B, C, D&lt;/P&gt;&lt;P&gt;dt2 has the columns B, X, Y, Z&lt;/P&gt;&lt;P&gt;dt3 has the columns D, Q, R, S&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to lock B in table dt2. How do I do that? The usual ":B &amp;lt;&amp;lt; lock (1)" script is locking B in dt1.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2024 15:10:38 GMT</pubDate>
    <dc:creator>AsymptoticCos</dc:creator>
    <dc:date>2024-06-20T15:10:38Z</dc:date>
    <item>
      <title>Lock a column in script while working with multiple tables with same column names</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-a-column-in-script-while-working-with-multiple-tables-with/m-p/767390#M94758</link>
      <description>&lt;P&gt;I have three tables I am working with in my JSL. I am calling these dt1, dt2, dt3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;dt1 has the columns A, B, C, D&lt;/P&gt;&lt;P&gt;dt2 has the columns B, X, Y, Z&lt;/P&gt;&lt;P&gt;dt3 has the columns D, Q, R, S&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to lock B in table dt2. How do I do that? The usual ":B &amp;lt;&amp;lt; lock (1)" script is locking B in dt1.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 15:10:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-a-column-in-script-while-working-with-multiple-tables-with/m-p/767390#M94758</guid>
      <dc:creator>AsymptoticCos</dc:creator>
      <dc:date>2024-06-20T15:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a column in script while working with multiple tables with same column names</title>
      <link>https://community.jmp.com/t5/Discussions/Lock-a-column-in-script-while-working-with-multiple-tables-with/m-p/767403#M94759</link>
      <description>&lt;P&gt;If you don't tell JMP which table to use, it uses current data table -&amp;gt; use more robust method of referencing to your column (add datatable reference). Column(dtref, colname) is my preferred method&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
Column(dt, "Age") &amp;lt;&amp;lt; Lock(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could also use dt:Age&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt:Age &amp;lt;&amp;lt; Lock(1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;From Scripting Guide check out &lt;A href="https://www.jmp.com/support/help/en/18.0/#page/jmp/scoping-operators.shtml#" target="_blank" rel="noopener"&gt; Scripting Guide &amp;gt; JSL Building Blocks &amp;gt; Rules for Name Resolution &amp;gt; Scoping Operators&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2024 15:19:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lock-a-column-in-script-while-working-with-multiple-tables-with/m-p/767403#M94759</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-06-20T15:19:55Z</dc:date>
    </item>
  </channel>
</rss>

