<?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: Unable to delete Row from infotable with function myInfoTable.RemoveRow(rowIndex); in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Unable-to-delete-Row-from-infotable-with-function-myInfoTable/m-p/946828#M66520</link>
    <description>&lt;P&gt;You need to update again into the data table.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Allied_Entries_SCW1.DT&lt;/LI-CODE&gt;
&lt;P&gt;Use following services.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;AddOrUpdateDataTableEntry()
or 
AddOrUpdateDataTableEntries()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Apr 2024 14:15:06 GMT</pubDate>
    <dc:creator>Sathishkumar_C</dc:creator>
    <dc:date>2024-04-29T14:15:06Z</dc:date>
    <item>
      <title>Unable to delete Row from infotable with function myInfoTable.RemoveRow(rowIndex);</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Unable-to-delete-Row-from-infotable-with-function-myInfoTable/m-p/946814#M66518</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let entry = Things["Allied_Entries_SCW1.DT"].GetDataTableEntryByKey({key:"1713786015000SCW1E-AS-02"});

logger.info(entry.rows);

entry.rows[0].versionData.RemoveRow(0);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;versionData is an infotable but i am still not able to remove the row with its index. As you can see this is an infotable why i am unable to remove it. any idea please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jamal8548_0-1714397471888.png"&gt;&lt;img src="https://www.ptcusercommunity.com/skins/images/81D70C6C2B79127C61116663D4056ED7/ptc_skin/images/image_not_found.png" alt="Jamal8548_0-1714397471888.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;========================================================================================================&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;FURTHER TESTING&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am removing row and updating that entry with removing that row but it is removing row at run time means i get what i want as an output but it not updating it in &lt;STRONG&gt;datatable.&lt;/STRONG&gt; Anyone has an idea?&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 13:48:50 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Unable-to-delete-Row-from-infotable-with-function-myInfoTable/m-p/946814#M66518</guid>
      <dc:creator>MA8731174</dc:creator>
      <dc:date>2024-04-29T13:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to delete Row from infotable with function myInfoTable.RemoveRow(rowIndex);</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Unable-to-delete-Row-from-infotable-with-function-myInfoTable/m-p/946828#M66520</link>
      <description>&lt;P&gt;You need to update again into the data table.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Allied_Entries_SCW1.DT&lt;/LI-CODE&gt;
&lt;P&gt;Use following services.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;AddOrUpdateDataTableEntry()
or 
AddOrUpdateDataTableEntries()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2024 14:15:06 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Unable-to-delete-Row-from-infotable-with-function-myInfoTable/m-p/946828#M66520</guid>
      <dc:creator>Sathishkumar_C</dc:creator>
      <dc:date>2024-04-29T14:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to delete Row from infotable with function myInfoTable.RemoveRow(rowIndex);</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Unable-to-delete-Row-from-infotable-with-function-myInfoTable/m-p/946967#M66524</link>
      <description>&lt;P&gt;I am already doing this but it is not working as it returns the result on runtime correct but not updating the entry into datatable.&lt;/P&gt;&lt;P&gt;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/271365"&gt;@PaiChung&lt;/a&gt;&amp;nbsp;any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let entry = Things["TestBench_Entries_SCW1.DT"].GetDataTableEntryByKey({key:"1709109105000SCW1E-SCW-EMT-06"});



 let values;
if ( entry.rows[0].versionData &amp;amp;&amp;amp; entry.rows[0].versionData.rows &amp;amp;&amp;amp; entry.rows[0].versionData.rows.length &amp;gt; 1 ) {

   let newVersionData = entry.rows[0].versionData;
   
 
   
         values = Things["TestBench_Entries_SCW1.DT"].CreateValues();
          values.entryTimeStamp     = entry.rows[0].entryTimeStamp; // STRING [Primary Key]
          values.Location 		    = entry.rows[0].Location; // INFOTABLE
          values.Position           = entry.rows[0].Position; // DATETIME
          values.entryDate          = entry.rows[0].entryDate; // STRING
          values.status             = entry.rows[0].status ; //"SCW1Phase4";// STRING  // To change the status of the main entry 
          values.tinNumber          = entry.rows[0].tinNumber;// STRING
          values.versionData        = newVersionData.RemoveRow(9); //entry.rows[0].versionData;// STRING
  
}




Things["TestBench_Entries_SCW1.DT"].AddOrUpdateDataTableEntry({values:values});
result = entry;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 05:55:09 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Unable-to-delete-Row-from-infotable-with-function-myInfoTable/m-p/946967#M66524</guid>
      <dc:creator>MA8731174</dc:creator>
      <dc:date>2024-04-30T05:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to delete Row from infotable with function myInfoTable.RemoveRow(rowIndex);</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Unable-to-delete-Row-from-infotable-with-function-myInfoTable/m-p/946971#M66525</link>
      <description>&lt;P&gt;I got a solution for this issue which is very weird and i could not understand that why it is behaving like that but at least i have a solution now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let entry = Things["TestBench_Entries_SCW1.DT"].GetDataTableEntryByKey({key:"1709109105000SCW1E-SCW-EMT-06"});


 let values;

   let newVersionData = entry.rows[0].versionData.RemoveRow(9); // this wil remove the row and then idk how we are updating the entry in the datatable but it is working actually
   
 
   
         values = Things["TestBench_Entries_SCW1.DT"].CreateValues();
          values.entryTimeStamp     = entry.rows[0].entryTimeStamp; // STRING [Primary Key]
          values.Location 		    = entry.rows[0].Location; // INFOTABLE
          values.Position           = entry.rows[0].Position; // DATETIME
          values.entryDate          = entry.rows[0].entryDate; // STRING
          values.status             = entry.rows[0].status ; //"SCW1Phase4";// STRING  // To change the status of the main entry 
          values.tinNumber          = entry.rows[0].tinNumber;// STRING
          values.versionData        = entry.rows[0].tinNumber; //entry.rows[0].versionData;// STRING
  





Things["TestBench_Entries_SCW1.DT"].AddOrUpdateDataTableEntry({values:values});
result = entry;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 06:13:55 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Unable-to-delete-Row-from-infotable-with-function-myInfoTable/m-p/946971#M66525</guid>
      <dc:creator>MA8731174</dc:creator>
      <dc:date>2024-04-30T06:13:55Z</dc:date>
    </item>
  </channel>
</rss>

