Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum Does anyone know if queries in the Environmental Attribute layouts can be accessed and changed from a Powershell script?
    • Sign In

    • State Not Answered
    • Replies 5 replies
    • Subscribers 66 subscribers
    • Views 563 views
    • Users 0 members are here
    • powershell

    Does anyone know if queries in the Environmental Attribute layouts can be accessed and changed from a Powershell script?

    Robert Biggar
    Offline Robert Biggar over 1 year ago

    We have a number of queries that are tied to the fields (attributes) in "attribute  layouts". I was just wondering if there is a way to read and perhaps write to these "field select statements"?

    I haven't found a way (except via the interface) yet.

    Thanks!

    Bob

    • Sign in to reply
    • Cancel

    Top Replies

    • Kevin van Haaren
      Offline Kevin van Haaren Fri, Oct 29 2021 2:42 PM +1
      Most of the attribute properties can be read and changed using these commands: Get-PWAttributeSettings Get-PWAttributeUpdateValueTriggerAttribute Get-PWAttributeValueListFixedList Set-PWAttributeDefaultValueSettings…
    • Robert Biggar
      Offline Robert Biggar Tue, Nov 9 2021 7:40 AM in reply to Kevin van Haaren +1
      Thanks for the help with this, Kevin!! I managed to get a script running that uses this and it is a big help. I found for future Reference: "Get-PWAttributeSettings" - gave me a listing of all the…
    • Robert Biggar
      Offline Robert Biggar Tue, Nov 9 2021 8:12 AM in reply to Robert Biggar +1
      found More and corrected some....I could have sworn I did that get-help before...anyway... Also Missing a few...any Ideas? ++++ NOTE: before I had the "Set-PWAttributeExtraValuesSettings" wrong…
    • Kevin van Haaren
      0 Offline Kevin van Haaren Fri, Oct 29 2021 2:42 PM

      Most of the attribute properties can be read and changed using these commands:

      Get-PWAttributeSettings
      Get-PWAttributeUpdateValueTriggerAttribute
      Get-PWAttributeValueListFixedList
      
      Set-PWAttributeDefaultValueSettings
      Set-PWAttributeExtraValuesSettings
      Set-PWAttributeUpdateValueSettings
      Set-PWAttributeValueListSettings
      
      

      I don't think you can change the positioning of the label/field in the Attribute Layout but that's about it.

       

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Robert Biggar
      0 Offline Robert Biggar Tue, Nov 9 2021 7:40 AM in reply to Kevin van Haaren

      Thanks for the help with this, Kevin!!

      I managed to get a script running that uses this and it is a big help.

      I found for future Reference:

      "Get-PWAttributeSettings" - gave me a listing of all the Attribute values for the target Attribute in the ENVIRONMENT;

      Get-PWAttributeSettings -EnvironmentName '<env name>' -AttributeName '<ATTR Name>' -Verbose

      -------   The "Gets"....

      "Get-PWAttributeUpdateValueTriggerAttribute" - Gets the Attribute name and ID of the "Trigger Control Attribute"
      for the specified Attribute

      "Get-PWAttributeValueListFixedList" - Returns the fixed list of an Attribute and each value's descrition

      --------------------------- The "Sets"...

      "Set-PWAttributeDefaultValueSettings" - Sets values specified by Type in the "Default value" box of the Value tab (does not like blanks)

      "Set-PWAttributeUpdateValueSettings" - Sets values specified by Type in the "Update value" box of the Value tab

      "Set-PWAttributeValueListValueSettings" - Sets values specified by Type in the "Value List" box of the Value tab
      (toggle buttons set by separate command line flags)

      "Set-PWAttributeExtraValuesSettings" - Sets values in the "Editing Tab".

      ===============================================================================================================


      The above describes how to get and change most of the settings in the Attributes.....
      Are there other cmdlets to change the ones I have under "????"?

      (Below is a listing of everything returned by "Get-PWAttributeSettings", broken up by which CMDLet can change Those values....)


      ATTRIBUTE VALUE NAME  :   ATTRIBUTE SETTING
      ----------------------------------------------------------------------------------------------------------

      ?????
      ===========================================================================================
      EnvironmentName : <ENV NAME>
      EnvironmentID : 110
      ColumnName : <attribute Name>
      ColumnID : 22

      ?????
      ===========================================================================================
      General_AttributeValueUnique : 0
      General_AttributeValueRequired : 0
      General_AttributeValueEditableIfFinal : 0
      General_AttributeValueAccess : 1
      General_AttributeValueAccessName : Edit
      General_ClearAttributeValueWhenCopiedInsideDocument : 0
      General_ClearAttributeValueWhenCopiedInsideEnvironment : 0
      General_ClearAttributeValueWhenCopiedMovedFromOtherEnvironment : 0

      "Set-PWAttributeDefaultValueSettings":
      ===========================================================================================
      Value_DefaultValueType : 3
      Value_DefaultValueTypeName : System variable
      Value_DefaultValueValue : $PROJECT#PROJECT_REGION$

      "Set-PWAttributeUpdateValueSettings":
      ===========================================================================================
      Value_UpdateValueType : 2
      Value_UpdateValueTypeName : Select
      Value_UpdateValueValue : SELECT...


      ?????
      ===========================================================================================
      Value_TriggeringAttributes : {JOB_NO}

      "Set-PWAttributeValueListValueSettings"
      ============================================================================================
      Value_ValueListLimitToList : 0
      Value_ValueListMultipleSelection : 0
      Value_ValueListType : 1
      Value_ValueListTypeName : Select
      Value_ValueListValue : SELECT...


      "Set-PWAttributeExtraValuesSettings"
      ============================================================================================
      Edit_ControlTypeName : Edit field
      Edit_ControlTypeID : 1
      Edit_ControlFont :
      Edit_ControlFontSize : 0
      Edit_FormatString :
      Edit_MaximumInputTextLength : 0


      ?????
      ===========================================================================================
      ExtraValues_1 :
      ExtraValues_2 :
      ExtraValues_3 :
      ExtraValues_4 :
      ExtraValues_5 :


      - Thank You!

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Robert Biggar
      0 Offline Robert Biggar Tue, Nov 9 2021 8:12 AM in reply to Robert Biggar

      found More and corrected some....I could have sworn I did that get-help before...anyway...

      Also Missing a few...any Ideas?

      ++++ NOTE: before I had the "Set-PWAttributeExtraValuesSettings" wrong...so keep that in mind! ++++++++

      "Get-PWAttributeSettings" - gave me a listing of all the Attribute values for the target Attribute in the ENVIRONMENT;

      "Get-PWAttributeSettings - EnvironmentName"  '<env name>' -AttributeName '<ATTR Name>' -Verbose

      -------

      "Get-PWAttributeUpdateValueTriggerAttribute" - Gets the Attribute name and ID of the "Trigger Control Attribute"
      for the specified Attribute

      "Get-PWAttributeValueListFixedList" - Returns the fixed list of an Attribute and each value's description

      ---------------------------

      "Set-PWAttributeDefaultValueSettings" - Sets values specified by Type in the "Default value" box of the Value tab (does not like blanks)

      "Set-PWAttributeUpdateValueSettings" - Sets values specified by Type in the "Update value" box of the Value tab

      "Set-PWAttributeValueListValueSettings" - Sets values specified by Type in the "Value List" box of the Value tab
      (toggle buttons set by separate command line flags)

      >>> "Set-PWAttributeEditingSettings" - Sets values in the "Editing Tab".

      >>> "Set-PWAttributeExtraValuesSettings" - Sets values in the "Extra Values Tab".

      >>> Added:

      Set-PWAttributeGeneralSettings  - updates an attribute's General settings values within a specified environment.


      Set-PWAttributeExchangeRulesUpdateFileConditions - Sets the attribute exchange Update file conditions.

      ===========================================================================================


      ATTRIBUTE VALUE NAME ATTRIBUTE SETTING
      ----------------------------------------------------------------------------------------------------------

      ?????
      ===========================================================================================
      EnvironmentName : <ENV NAME>
      EnvironmentID : 110
      ColumnName : <attribute Name>
      ColumnID : 22

      "Set-PWAttributeGeneralSettings"
      ===========================================================================================
      General_AttributeValueUnique : 0
      General_AttributeValueRequired : 0
      General_AttributeValueEditableIfFinal : 0
      General_AttributeValueAccess : 1
      General_AttributeValueAccessName : Edit
      General_ClearAttributeValueWhenCopiedInsideDocument : 0
      General_ClearAttributeValueWhenCopiedInsideEnvironment : 0
      General_ClearAttributeValueWhenCopiedMovedFromOtherEnvironment : 0

      "Set-PWAttributeDefaultValueSettings":
      ===========================================================================================
      Value_DefaultValueType : 3
      Value_DefaultValueTypeName : System variable
      Value_DefaultValueValue : $PROJECT#PROJECT_REGION$

      "Set-PWAttributeUpdateValueSettings":
      ===========================================================================================
      Value_UpdateValueType : 2
      Value_UpdateValueTypeName : Select
      Value_UpdateValueValue : SELECT...


      ?????
      ===========================================================================================
      Value_TriggeringAttributes : {JOB_NO}

      "Set-PWAttributeValueListValueSettings"
      ============================================================================================
      Value_ValueListLimitToList : 0
      Value_ValueListMultipleSelection : 0
      Value_ValueListType : 1
      Value_ValueListTypeName : Select
      Value_ValueListValue : SELECT...


      "Set-PWAttributeEditingSettings"
      ============================================================================================
      Edit_ControlTypeName : Edit field
      Edit_ControlTypeID : 1
      Edit_ControlFont :
      Edit_ControlFontSize : 0
      Edit_FormatString :
      Edit_MaximumInputTextLength : 0


      "Set-PWAttributeExtraValuesSettings"
      ===========================================================================================
      ExtraValues_1 :
      ExtraValues_2 :
      ExtraValues_3 :
      ExtraValues_4 :
      ExtraValues_5 :

      I think that's all I could find...I'm still Looking, Though...

      Thanks!

      Bob

      • Cancel
      • Vote Up +1 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Kevin van Haaren
      0 Offline Kevin van Haaren Tue, Nov 9 2021 2:02 PM in reply to Robert Biggar

      Thanks. I know i'm going to need this in the future.

       

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Robert Biggar
      0 Offline Robert Biggar Tue, Nov 9 2021 2:14 PM in reply to Kevin van Haaren

      Happy to be of some help, Kevin...You have helped me out a LOT!!

      Much appreciated!

      B

      • Cancel
      • Vote Up +1 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