Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum 'Get-PWDocumentsBySearch' bug: Returning all versions of documents when the '-GetVersionsToo' flag is not active?
    • Sign In

    • State Verified Answer
    • Replies 2 replies
    • Subscribers 65 subscribers
    • Views 562 views
    • Users 0 members are here
    • powershell
    • pwps_dab
    • ProjectWise Programming
    • ProjectWise PowerShell Modules

    'Get-PWDocumentsBySearch' bug: Returning all versions of documents when the '-GetVersionsToo' flag is not active?

    Edward Ashbolt
    Offline Edward Ashbolt over 3 years ago

    I have a saved search which when combined with 'Get-PWDocumentsBySearch' produces a list of all versions? Looking in ProjectWise explorer the saved search gives me a list of 81 documents / 356 with 'Show versions' on; whilst the cmdlet using the same search = 356.

    Get-PWDocumentsBySearch -SearchName 'SavedSearch' -Personal

    Has anyone else come across this issue?

    Thanks,

    Ed

    • Sign in to reply
    • Cancel

    Top Replies

    • Brian Flaherty
      Offline Brian Flaherty Wed, Jan 15 2020 1:54 AM +1 verified
      I am unable to replicate this issue. Did you include the 'Only Current' option within the Search by Form or 'Current Version' in the Define Search dialog?
    • Brian Flaherty
      +1 Offline Brian Flaherty Wed, Jan 15 2020 1:54 AM

      I am unable to replicate this issue.  Did you include the 'Only Current' option within the Search by Form or 'Current Version' in the Define Search dialog?

      Answer Verified By: Edward Ashbolt 

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Reject Answer
      • Cancel
    • Edward Ashbolt
      0 Offline Edward Ashbolt Wed, Jan 15 2020 3:35 PM in reply to Brian Flaherty

      Ah right, I have ticked the 'Only Current' option in the saved search now and that seems to have fixed it... I incorrectly assumed that it would only get the current version in the cmdlet if the 'GetVersionsToo' flag was inactive; also within PW Explorer the saved search didn't show any versions as well. It seems it was just user error then!

      Thanks for the help,

      Ed

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel

    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