Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Update-PWRichProjectProperties
    • Sign In

    • State Suggested Answer
    • +1 person also asked this people also asked this
    • Replies 18 replies
    • Answers 5 answers
    • Subscribers 68 subscribers
    • Views 2670 views
    • Users 0 members are here

    Update-PWRichProjectProperties

    Matthew Saxon
    Offline Matthew Saxon over 3 years ago

    My attempt to alter the work area properties of a single work area in a folder with multiple work areas has resulted in them all being changed to the new values. Can anyone see what I have done wrong?

    It is of the form:

    Get-PWRichProjects -FolderPath ‘root work area\secondary work area\folder\tertiary work area’ | Update-PWRichProjectProperties -ProjectProperties @{PROJECT_field1="xxxx"; PROJECT_field2="yyyy"; PROJECT_field3="zzzz"}

    And here is my exact script based our actual folder names, locations and project field names:

    Get-PWRichProjects -FolderPath 'Multicom Resources Pty Ltd\4480 - St Elmo Vanadium\50 - Procurement Contractual Commercial\CP1-003 - Building - Laboratory' | Update-PWRichProjectProperties -ProjectProperties @{PROJECT_Package="CP1-003"; PROJECT_Package_Name="Building - Laboratory"; PROJECT_ProjectNo="4480"}

    • Sign in to reply
    • Cancel
    Parents
    • Matthew Saxon
      0 Offline Matthew Saxon Fri, Mar 13 2020 12:18 AM

      I tried it in the new version and its till trying to get all projects

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Dan Williams
      0 Offline Dan Williams Fri, Mar 13 2020 3:09 AM in reply to Matthew Saxon

      OK, I think I found a problem with what you are showing in your screen shots and your script, but I'll need you to verify the details.

      I took a closer look at your screenshot of your datasource and noticed that the path that you are passing Get-PWRichProjects is NOT a rich project.  So I created a similar folder structure on my test datasource, and used this to see what the results would be.  Here's what my folder structure looks like:

      And I first just tried the Get-PWRichProjects like this:

      Then I tried this:

      And as I would expect, none of the projects under the target rich project (actually just a folder) were changed:

      So, I'm curious if this is what you are experiencing?  Why would any other rich projects have their properties changed?

      However, if I change the -FolderPath parameter to a Rich Project, like this:

      The result is what I expected:

      So, what's different between what I have tried, and what you are trying?

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    Reply
    • Dan Williams
      0 Offline Dan Williams Fri, Mar 13 2020 3:09 AM in reply to Matthew Saxon

      OK, I think I found a problem with what you are showing in your screen shots and your script, but I'll need you to verify the details.

      I took a closer look at your screenshot of your datasource and noticed that the path that you are passing Get-PWRichProjects is NOT a rich project.  So I created a similar folder structure on my test datasource, and used this to see what the results would be.  Here's what my folder structure looks like:

      And I first just tried the Get-PWRichProjects like this:

      Then I tried this:

      And as I would expect, none of the projects under the target rich project (actually just a folder) were changed:

      So, I'm curious if this is what you are experiencing?  Why would any other rich projects have their properties changed?

      However, if I change the -FolderPath parameter to a Rich Project, like this:

      The result is what I expected:

      So, what's different between what I have tried, and what you are trying?

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    Children
    No Data

    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies