<?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/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Find out when a workarea is updated</title><link>https://communities.bentley.com/products/projectwise/f/projectwise-powershell-extensions-forum/236149/find-out-when-a-workarea-is-updated</link><description>Hi everyone, 
 Does the workarea property &amp;#39;updatedatetime&amp;#39; indicate if a file or a folder in a workarea is updated? I&amp;#39;m trying to find out if any file or folder in a workarea is updated. How can i catch this behaviour? 
 
 Thanks.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Find out when a workarea is updated</title><link>https://communities.bentley.com/thread/741092?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2022 16:43:24 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:ed1bbfda-104f-424b-83ff-def5bf87d428</guid><dc:creator>Michel-Ange Doubogan</dc:creator><description>&lt;p&gt;I used the cmdlet&amp;nbsp;Get-PWFolderAuditTrailRecords but it doesn&amp;#39;t give an update date in the output.&lt;/p&gt;
&lt;p&gt;I also got this warning message :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;WARNING: Failed to retrieved document audit trail information for documents in project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find out when a workarea is updated</title><link>https://communities.bentley.com/thread/735408?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 17:47:49 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:7cbfec92-6e98-404d-b7b0-7b6e8dad8997</guid><dc:creator>Brian Flaherty</dc:creator><description>&lt;p&gt;You could query the audit trail table to look for any updates.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find out when a workarea is updated</title><link>https://communities.bentley.com/thread/735403?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 17:14:30 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:b1b1758d-f6af-4166-90a3-fc37e4c76354</guid><dc:creator>Dave Cole</dc:creator><description>&lt;p&gt;The best I came up with using SSMS to tell if an attribute of a work area has been updated is:&lt;/p&gt;
&lt;p&gt;SELECT * FROM sys.tables&lt;br /&gt;WHERE [name] like &amp;#39;%&amp;#39;&lt;br /&gt;ORDER BY [modify_date] desc&lt;/p&gt;
&lt;p&gt;Replace % with the table name of your Work Area.&lt;/p&gt;
&lt;p&gt;It doesn&amp;#39;t tell you what was updated just that something was. Not very helpful. I also don&amp;#39;t see anything in the audit trail when a WA attribute is updated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find out when a workarea is updated</title><link>https://communities.bentley.com/thread/734028?ContentTypeID=1</link><pubDate>Tue, 27 Sep 2022 17:25:48 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:c243122e-f428-4f60-ae7f-bbea67f54436</guid><dc:creator>Michel-Ange Doubogan</dc:creator><description>&lt;p&gt;Alright thank you Kevin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find out when a workarea is updated</title><link>https://communities.bentley.com/thread/733822?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 19:52:23 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:267eff64-5613-4835-ba9a-d4a36ed7d285</guid><dc:creator>Kevin van Haaren</dc:creator><description>&lt;p&gt;Oh, hmmm, I&amp;#39;m not seeing a way to tell when one of the Work Area properties is updated. It appears UpdateDateTime only updates when any of the non-WorkArea properties is changed. Perhaps someone else is aware of a way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find out when a workarea is updated</title><link>https://communities.bentley.com/thread/733812?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 17:47:44 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:94c7f6bc-9298-42b5-b27e-d824dc6b974d</guid><dc:creator>Michel-Ange Doubogan</dc:creator><description>&lt;p&gt;Thank you Kevin i find your respond very helpful. So there is no cmdlet in powershell which indicate&amp;nbsp;if an attribute of a work area has been updated?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Find out when a workarea is updated</title><link>https://communities.bentley.com/thread/733808?ContentTypeID=1</link><pubDate>Mon, 26 Sep 2022 17:07:23 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:e9b92aba-9112-4701-8889-3e3fd7e44884</guid><dc:creator>Kevin van Haaren</dc:creator><description>&lt;p&gt;Are you talking about a property under the Properties tab when you right-click the root folder a Work Area, Select Properties and then click the Properties tab? If so all those properties are attributes created by the ProjectWise admin and (unless they&amp;#39;ve done some backed database magic) don&amp;#39;t update automatically.&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re talking about the UpdateDateTime of just the general Folder properties (the UpdateDateTime property returned by&amp;nbsp;Get-PWFolders cmdlet) as near as I can figure the only thing that causes that property to update is changing one of the properties on that folder (Description, a work area property, etc...). Adding/modifying/deleteing files or folders inside that folder does not update it.&lt;/p&gt;
&lt;p&gt;There is a cmdlet&amp;nbsp;Get-PWFolderTreeMaxFileUpdateDate that looks like it should return this info but in my testing it seems wrong? I tested it on a folder where I had updated files today and it&amp;#39;s returning a date over a year old.&lt;/p&gt;
&lt;p&gt;Get-PWRichProjectMaxUpdateDate also seems like it should do it, but I&amp;#39;m not exactly sure how that operates. I pass it a folder path to a richproject and returns info for every rich project in the datasource (the dates actually look correct to me though, unlike the other one).&lt;/p&gt;
&lt;p&gt;If you want to write your own:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;$pwDocs = Get-PWDocumentsBySearch -FolderPath &amp;#39;path\to\folder&amp;#39;
$latest = ($pwDocs | Sort -Descending DocumentUpdateDate | Select-Object -First 1).DocumentUpdateDate&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;That will probably be slow and suck up a ton of memory for really large folder structures. although, hmmm, not sure this&amp;#39;ll be faster but should free up the memory quicker:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="powershell"&gt;$latest = (Get-PWDocumentsBySearch -FolderPath &amp;#39;path\to\folder&amp;#39;).DocumentUpdateDate | Sort -Descending | Select -First 1
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>