<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Stephen Herrick's Communities Activities</title><link>https://communities.bentley.com/members/323f68aa_2d00_07c4_2d00_4d5a_2d00_89b6_2d00_0ec8ea07a992</link><description>Recent activity for people in Stephen Herrick's community</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Adding folder propeties to a datatable for reporting</title><link>https://communities.bentley.com/products/programming/projectwise_programming/f/projectwise-programming---forum/210965/adding-folder-propeties-to-a-datatable-for-reporting</link><pubDate>Thu, 11 Mar 2021 15:01:23 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:f0584d26-a1c2-42c8-9ea9-73621ce67328</guid><dc:creator>Stephen Herrick</dc:creator><description>&lt;p&gt;All,&lt;/p&gt;
&lt;p&gt;So i am writing a script to gather information about folders in a project, checking for Environment, Workflow etc...&lt;/p&gt;
&lt;p&gt;i created a datatable so i can use that to create the excel file.&lt;/p&gt;
&lt;p&gt;however i am getting the following error when adding a row to the datatable&lt;/p&gt;
&lt;p&gt;PS C:\WINDOWS\system32&amp;gt; $dr = $GET_FoldersDT.NewRow()&lt;br /&gt;Method invocation failed because [PWPS_DAB.CommonTypes+ProjectWiseFolder] does not contain a method named &amp;#39;NewRow&amp;#39;.&lt;br /&gt;At line:1 char:13&lt;br /&gt;+ $dr = $GET_FoldersDT.NewRow()&lt;br /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;br /&gt; + CategoryInfo : InvalidOperation: (:) [], RuntimeException&lt;br /&gt; + FullyQualifiedErrorId : MethodNotFound&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Below is the snipit of code where i am setting the datatable, and looping through the folders&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;$FolderReportDT = New-Object System.Data.DataTable (&amp;quot;Folder Report&amp;quot;)&lt;/p&gt;
&lt;p&gt;#Going to create the specific columns to store the work are infomration, participant count, and document count&lt;br /&gt; $FolderReportDT.Columns.Add(&amp;quot;Folder Name&amp;quot;)&lt;br /&gt; $FolderReportDT.Columns.Add(&amp;quot;Folder Environment&amp;quot;)&lt;br /&gt; $FolderReportDT.Columns.Add(&amp;quot;Folder Workflow&amp;quot;)&lt;br /&gt; $FolderReportDT.Columns.Add(&amp;quot;Folder Document COUNT&amp;quot;)&lt;br /&gt; $FolderReportDT.Columns.Add(&amp;quot;Folder Creator&amp;quot;)&lt;br /&gt; $FolderReportDT.Columns.Add(&amp;quot;Folder Owner Name&amp;quot;)&lt;br /&gt; $FolderReportDT.Columns.Add(&amp;quot;Folder URN&amp;quot;)&lt;br /&gt; &lt;br /&gt;New-PWLogin&lt;br /&gt;Get-PWCurrentDatasource&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;$StartedFrom = (Show-PWFolderBrowserDialog).FullPath&lt;/p&gt;
&lt;p&gt;$GET_FoldersDT = New-Object System.Data.DataTable&lt;/p&gt;
&lt;p&gt;$GET_FoldersDT = Get-PWFolders -FolderPath $StartedFrom -PopulatePaths&lt;br /&gt;Write-Host &amp;quot;there are &amp;quot; $GET_FoldersDT.count &amp;quot; folders found&amp;quot;&lt;/p&gt;
&lt;p&gt;foreach($DT_Row in $GET_FoldersDT)&lt;br /&gt; {&lt;/p&gt;
&lt;p&gt;$dr = $GET_FoldersDT.NewRow()&lt;/p&gt;
&lt;p&gt;TIA&lt;/p&gt;
&lt;p&gt;Stephen&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>Let me Help You</title><link>https://communities.bentley.com/achievements/687f4b6d-e18a-4e55-836c-49926ca2c9d9</link><pubDate>Fri, 21 Sep 2018 07:28:37 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:a6987b5b-9d2e-4b96-b469-46aaca939329</guid><dc:creator /><description>Answer a question that is verified as helpful or correct.</description></item><item><title>Discussion Starter I</title><link>https://communities.bentley.com/achievements/21025ab1-febb-4fb4-a872-d32a921cb45c</link><pubDate>Tue, 22 May 2018 12:56:04 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:b757b70e-35c4-4178-913f-9ac44c6ee596</guid><dc:creator /><description>Start a discussion in a forum that receives 5 replies.</description></item><item><title>Ask A Question II</title><link>https://communities.bentley.com/achievements/cd3cd235-25c1-476e-bb88-33a5705ca45a</link><pubDate>Tue, 18 Jul 2017 03:29:23 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:9142109e-54b5-4d46-a48f-c3c52d4b8729</guid><dc:creator /><description>Ask 10 questions in a forum.</description></item><item><title>Ask A Question I</title><link>https://communities.bentley.com/achievements/460ac7df-7ccc-4c42-a204-9e05eef3be09</link><pubDate>Tue, 18 Jul 2017 15:50:54 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:0a9254da-902b-4eff-9709-36dcb21ce5b2</guid><dc:creator /><description>Ask a question in a forum.</description></item></channel></rss>