Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise PowerShell Extensions Forum How to clear a Value List
    • Sign In

    • State Not Answered
    • +2 person also asked this people also asked this
    • Replies 1 reply
    • Subscribers 67 subscribers
    • Views 193 views
    • Users 0 members are here

    How to clear a Value List

    Scott Turner
    Offline Scott Turner 10 months ago

    I am writing a script to cycle through all data sources and update the Value List for a specific attribute in each selected environment.

    Adding the new values is easy enough, but how do I clear existing (or specific) values?

    I have tried this:

    Set-PWAttributeValueListSettings -AttributeName $Att -EnvironmentName $Env -ValueType None

    ...but when I then add my new values, it uses the same list as before (i.e. any previous values are included in the list).

    The only way I have gotten the list to really clear is to delete the attribute and recreate it, which isn't a workable solution.

    Thank you,

    Scott

    • Sign in to reply
    • Cancel
    Parents
    • Brian Flaherty
      0 Offline Brian Flaherty Fri, Nov 18 2022 11:42 AM

      I don't think there is not a way to remove entries from an existing Value List using PowerShell. If there is enough of a need, may be able to convince Dave B. and co, to add a new cmdlet to do this. Or modify the existing one. Slight smile

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • Brian Flaherty
      0 Offline Brian Flaherty Fri, Nov 18 2022 11:42 AM

      I don't think there is not a way to remove entries from an existing Value List using PowerShell. If there is enough of a need, may be able to convince Dave B. and co, to add a new cmdlet to do this. Or modify the existing one. Slight smile

      • 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