<?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 Upload a file for a WTDocument from Thingworx in Windchill Customization</title>
    <link>https://community.ptc.com/t5/Windchill-Customization/Upload-a-file-for-a-WTDocument-from-Thingworx/m-p/489787#M5893</link>
    <description>&lt;PRE&gt;var params = {
    infoTableName : "InfoTable",
    dataShapeName : "demo.wt.doc.WTDocument"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(ptc-demoProblemReportShape)
var newDocument = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);
newDocument.AddRow({
    name: "TestDocument1",
    number: "000001",
//    'state--state': "Released",
//    'versionInfo--identifier--versionId': "A",
    type: "wt.doc.WTDocument",
    containerReference: "OR:wt.inf.container.ExchangeContainer:5:219321006-1506495753013-268599241-1-56-168-192@blrmaigwd27067.itcinfotech.com",
    'folderingInfo--cabinet': "OR:wt.folder.Cabinet:280:219321006-1506495753013-268599241-1-56-168-192@blrmaigwd27067.itcinfotech.com"
});
var params = {
    dataShape: 'demo.wt.doc.WTDocument' /* DATASHAPENAME */,
    objects: newDocument /* INFOTABLE */
};
// result: INFOTABLE dataShape: "undefined"
var createdDocument = me.Create(params);

var result = createdDocument;
&lt;/PRE&gt;
&lt;P&gt;With this service i'm able to create the WT Document in windchill. But i can't succeed in attaching a file to this document. Should i add the file as one of the properties of the document?&lt;/P&gt;
&lt;P&gt;Please provide a methodology for my requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and Regards &lt;BR /&gt;SaranKarthick&lt;/P&gt;</description>
    <pubDate>Fri, 15 Mar 2024 14:44:38 GMT</pubDate>
    <dc:creator>SaranKarthick</dc:creator>
    <dc:date>2024-03-15T14:44:38Z</dc:date>
    <item>
      <title>Upload a file for a WTDocument from Thingworx</title>
      <link>https://community.ptc.com/t5/Windchill-Customization/Upload-a-file-for-a-WTDocument-from-Thingworx/m-p/489787#M5893</link>
      <description>&lt;PRE&gt;var params = {
    infoTableName : "InfoTable",
    dataShapeName : "demo.wt.doc.WTDocument"
};
// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(ptc-demoProblemReportShape)
var newDocument = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);
newDocument.AddRow({
    name: "TestDocument1",
    number: "000001",
//    'state--state': "Released",
//    'versionInfo--identifier--versionId': "A",
    type: "wt.doc.WTDocument",
    containerReference: "OR:wt.inf.container.ExchangeContainer:5:219321006-1506495753013-268599241-1-56-168-192@blrmaigwd27067.itcinfotech.com",
    'folderingInfo--cabinet': "OR:wt.folder.Cabinet:280:219321006-1506495753013-268599241-1-56-168-192@blrmaigwd27067.itcinfotech.com"
});
var params = {
    dataShape: 'demo.wt.doc.WTDocument' /* DATASHAPENAME */,
    objects: newDocument /* INFOTABLE */
};
// result: INFOTABLE dataShape: "undefined"
var createdDocument = me.Create(params);

var result = createdDocument;
&lt;/PRE&gt;
&lt;P&gt;With this service i'm able to create the WT Document in windchill. But i can't succeed in attaching a file to this document. Should i add the file as one of the properties of the document?&lt;/P&gt;
&lt;P&gt;Please provide a methodology for my requirement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and Regards &lt;BR /&gt;SaranKarthick&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 14:44:38 GMT</pubDate>
      <guid>https://community.ptc.com/t5/Windchill-Customization/Upload-a-file-for-a-WTDocument-from-Thingworx/m-p/489787#M5893</guid>
      <dc:creator>SaranKarthick</dc:creator>
      <dc:date>2024-03-15T14:44:38Z</dc:date>
    </item>
  </channel>
</rss>

