Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum How do I extract "Doc_no_status" property from a document?
    • Sign In

    • State Not Answered
    • Replies 3 replies
    • Subscribers 65 subscribers
    • Views 161 views
    • Users 0 members are here
    • powershell
    • powershell_dab

    How do I extract "Doc_no_status" property from a document?

    Tomas Žukauskas
    Offline Tomas Žukauskas 27 days ago

    In PWE i see the "Doc_no_status" property on every single document:

    But in Powershel, when i try using Get-PWDocumentsBySearch (even with -GetAttributes parameter added), i do not see "Doc_no_status" property listed in the output.

    I also tried Get-PWFolders cmdlet, thinking that maybe "Doc_no_status" is actually a folder property, but no luck either.

    Please note, that i verified the associated folder's View via these lines:

    Write-Host 'Checking documents in' $folderPath
    
    $pwFolderView = Get-PWFolders -FolderPath $folderPath -Slow -JustOne | Select-Object -Property View
    
    write-host 'The associated view is: ' $pwFolderView 
    
    # Get Columns associated with the View assigned to the folder.
    $pwViewColumns = Export-PWViews -ViewNames $pwFolderView.View | Select-Object -Property ColumnName
    
    write-host 'The columns of the View are: ' $pwViewColumns
     
    And got the following output:
    Apparently, the "Doc_no_status" property does exist, albeit named as "qa_doc_no_status". So how do i extract its value then?

     

    • Sign in to reply
    • Cancel

    Top Replies

    • Brian Flaherty
      Offline Brian Flaherty Mon, Sep 11 2023 4:15 PM +1
      Where are you seeing the " Doc_no_status" for each document? Is it within the Attributes or More Attributes tabs? If so, then it is an Environment attribute. You can use something like the following to…
    Parents
    • Brian Flaherty
      0 Offline Brian Flaherty Mon, Sep 11 2023 4:15 PM

      Where are you seeing the "Doc_no_status" for each document? Is it within the Attributes or More Attributes tabs? If so, then it is an Environment attribute. You can use something like the following to get the name and description of all attributes within you PW Environment. Or use the "New-PWEnvironmentsReport" cmdlet to generate a report.

      $EnvironmentName = 'Simple'
      (Get-PWEnvironmentColumns -EnvironmentName $EnvironmentName).GetEnumerator() | Select-Object Name, Description | Sort-Object Name

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Tomas Žukauskas
      0 Offline Tomas Žukauskas Wed, Sep 13 2023 1:57 AM in reply to Brian Flaherty

      thank you,  the "qa_doc_no_status" is indeed within the Attributes tab. 

      So i have verified the name of the Environment that is associated with a Folder containing those documents, but how do i extract the Environment's "qa_doc_no_status" property value? And most importantly - how do i map it to each document? 

      As i understand, Documents inherit the Environment from the containing Folder. There are numerous documents within a single Folder and they have different  "qa_doc_no_status" values ("Valid", "Invalid", "Unprocessed", etc.). But the Environment is only one. And when i check "get-help" of Get-PWEnvironmentColumns and Get-PWEnvironments, i don't see any methods which might be used to map "qa_doc_no_status" values to each document within a given folder

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Tomas Žukauskas
      0 Offline Tomas Žukauskas Wed, Sep 13 2023 1:57 AM in reply to Brian Flaherty

      thank you,  the "qa_doc_no_status" is indeed within the Attributes tab. 

      So i have verified the name of the Environment that is associated with a Folder containing those documents, but how do i extract the Environment's "qa_doc_no_status" property value? And most importantly - how do i map it to each document? 

      As i understand, Documents inherit the Environment from the containing Folder. There are numerous documents within a single Folder and they have different  "qa_doc_no_status" values ("Valid", "Invalid", "Unprocessed", etc.). But the Environment is only one. And when i check "get-help" of Get-PWEnvironmentColumns and Get-PWEnvironments, i don't see any methods which might be used to map "qa_doc_no_status" values to each document within a given folder

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify 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