<?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: Set Things password from service in ThingWorx Developers</title>
    <link>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/589228#M33554</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/296761"&gt;@gabitudor&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If one of the responses provided by &lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/188679"&gt;@CarlesColl&lt;/a&gt; answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Sharon&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jan 2019 21:10:12 GMT</pubDate>
    <dc:creator>slangley</dc:creator>
    <dc:date>2019-01-15T21:10:12Z</dc:date>
    <item>
      <title>Set Things password from service</title>
      <link>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/588048#M33380</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have many Things with "Database" as Thing Template and i would like to make a service which sets the password to the database automatically (on running the service).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i looked into the snippets and found nothing so i thought it might be a security policy.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is it possible? Thanks :)&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 08:14:38 GMT</pubDate>
      <guid>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/588048#M33380</guid>
      <dc:creator>gabitudor</dc:creator>
      <dc:date>2019-01-08T08:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Things password from service</title>
      <link>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/588056#M33383</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Configuration section of a thing it's based on Configuration Tables, you should look on the services related to Configuration Tables in order to change any property shown on that section. Let's start:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;GetConfigurationTables --&amp;gt;
&lt;UL&gt;
&lt;LI&gt;ColumnAliases&lt;/LI&gt;
&lt;LI&gt;ConnectionInfo&lt;/LI&gt;
&lt;LI&gt;ConnectionMonitoring&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;From previous service we can infer that password will be on ConnectionInfo&lt;/LI&gt;
&lt;LI&gt;GetConfigurationTable({ tableName: "ConnectionInfo"}) -&amp;gt; Infotable with the following columns
&lt;UL&gt;
&lt;LI&gt;jDBCDriverClass, jDBCConnectionURL, connectionValidationString, MaxConnections, userName, &lt;STRONG&gt;password&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Here we have the password value (but it's shown as ****), if you do it from a service you will see the real password (at least for TW 7.3.X )&lt;/LI&gt;
&lt;LI&gt;Now you only need to Set the previous Configuration Table. the corresponding SetConfigurationTable or SetConfigurationTableRows in order to update the password accordingly.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Carles.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 08:52:13 GMT</pubDate>
      <guid>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/588056#M33383</guid>
      <dc:creator>CarlesColl</dc:creator>
      <dc:date>2019-01-08T08:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set Things password from service</title>
      <link>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/588394#M33441</link>
      <description>&lt;P&gt;Hi Charles,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for the answer! I tried as you said but i am facing a problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;// result: INFOTABLE dataShape: "EntityList"&lt;BR /&gt;var result = me.GetConfigurationTables();&lt;/P&gt;
&lt;P&gt;// table: INFOTABLE dataShape: ""&lt;BR /&gt;var table = me.GetConfigurationTable({&lt;BR /&gt; tableName: "ConnectionInfo" /* STRING */&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;me.SetConfigurationTableRows({&lt;BR /&gt; values: undefined /* INFOTABLE */,&lt;BR /&gt; persistent: undefined /* BOOLEAN */,&lt;BR /&gt; tableName: undefined /* STRING */&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here, at SetConfigurationTableRows, what am i supposed to fill? i cannot see the connection to the password i would like to change. Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 08:47:00 GMT</pubDate>
      <guid>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/588394#M33441</guid>
      <dc:creator>gabitudor</dc:creator>
      <dc:date>2019-01-10T08:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Things password from service</title>
      <link>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/588442#M33446</link>
      <description>&lt;P&gt;Something like this should do the trick:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;var newPassword ="newDesiredPassword";
var databaseName = "yourDataBaseName";
var tableName = "ConnectionInfo";
var actual = Things["PersistenceProviderSystemDatabase"].GetConfigurationTable({ tableName: tableName });
actual.rows[0].password = Resources["EncryptionServices"].EncryptPropertyValue({ data: newPassword&amp;nbsp;});
Things[databaseName].SetConfigurationTable({
    configurationTable: tableName,
    persistent: true,
    tableName: tableName
});&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jan 2019 14:55:18 GMT</pubDate>
      <guid>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/588442#M33446</guid>
      <dc:creator>CarlesColl</dc:creator>
      <dc:date>2019-01-10T14:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Things password from service</title>
      <link>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/589228#M33554</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/296761"&gt;@gabitudor&lt;/a&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If one of the responses provided by &lt;a href="https://community.ptc.com/t5/user/viewprofilepage/user-id/188679"&gt;@CarlesColl&lt;/a&gt; answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;--Sharon&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 21:10:12 GMT</pubDate>
      <guid>https://community.ptc.com/t5/ThingWorx-Developers/Set-Things-password-from-service/m-p/589228#M33554</guid>
      <dc:creator>slangley</dc:creator>
      <dc:date>2019-01-15T21:10:12Z</dc:date>
    </item>
  </channel>
</rss>

