Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Forum Help with ProjectWise Attribute SQL SELECT Statement
    • Sign In

    • State Not Answered
    • Replies 1 reply
    • Subscribers 60 subscribers
    • Views 2186 views
    • Users 0 members are here
    • attribute
    • ProjectWise Documents

    Help with ProjectWise Attribute SQL SELECT Statement

    wrkoutgeek1970
    Offline wrkoutgeek1970 over 5 years ago

    Hello Bentley Community,

    I am struggling to find the correct Microsoft SQL SELECT Statement for a ProjectWise Attribute. Here is the scenario:

    I have created 4 Attributes:

    1. dc_FDC_Number (INTEGER Type)
    2. dc_NDC_Number (INTEGER Type)
    3. dc_Submission_ID (WCHAR Type)
    4. dc_Submission_Name (WCHAR Type)

    GOAL: If the value of the dc_Submission_Name attribute is set to 'Field Design Change' (from the pick list), then the dc_FDC_Number value should increase by 1. Otherwise, the value should remain as is (no change).

    STATUS: Currently, the dc_FDC_Number value increases by 1 regardless of the selected value for the dc_Submission_Name attribute. This is with the Update value setting (for dc_FDC_Number attribute) defined as: SELECT '$EDIT#dc_FDC_Number$' + 1. Also, the Specific Attribute(s) are updated setting is set to include the dc_Submission_Name attribute.

    I'm thinking that there is some CASE Statement that will get me here. However, I am a SQL novice and can't seem to find the functional statement. Any and all help is/will be greatly appreciated.

    Many thanks in advance!

    Matthew

    • Sign in to reply
    • Cancel
    • wrkoutgeek1970
      0 Offline wrkoutgeek1970 Wed, May 9 2018 3:14 PM

      UPDATE: I found another Bentley Communities article that helped me find the solution:

      communities.bentley.com/.../concatenating-attributes-in-an-environment

      SOLUTION: SELECT CASE WHEN '$EDIT#dc_Submission_Name$' = 'Field Design Change' THEN '$EDIT#dc_FDC_Number$' + 1 ELSE '$EDIT#dc_FDC_Number$' END

      • 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