Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Forum Code to concatenate attributes to display in another attribute
    • Sign In

    • State Suggested Answer
    • Replies 3 replies
    • Answers 1 answer
    • Subscribers 59 subscribers
    • Views 580 views
    • Users 0 members are here

    Code to concatenate attributes to display in another attribute

    Russell Bunn
    Offline Russell Bunn over 2 years ago

    Hi,

    Does anyone have a snippet of code that would enable the Discipline code and Sequence to be concatenated and displayed in the Drawing No attribute?

    Kind regards

    Russell

    • Sign in to reply
    • Cancel
    • Peter Willmen
      0 Offline Peter Willmen Fri, Apr 30 2021 5:58 AM

      Hi Russell.

      Depends which server DB you are using.

      For SQL Server you can use the following:-

      SELECT '$EDIT#FIELD_1$' + ' ' + '$EDIT#FIELD_2$' 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    • Russell Bunn
      0 Offline Russell Bunn Sat, May 1 2021 1:17 AM

      Hi Peter,

      Thanks for getting back to me.  We are using a SQL db for our datasources so your code suggestion fits.  I have tried a similar string in the field but can't make anything appear without erroring when I cam in the explorer.

      Will give this another go on Monday.

      Thanks

      Russ

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Russell Bunn
      0 Offline Russell Bunn Mon, May 3 2021 9:52 PM in reply to Peter Willmen

      Hi,

      I finally found the issue.  The statement that yourself and others was perfectly correct however the copy/paste transfer used by me was where the issue happened.  The semi colons that came through from the external sources I used like Outlook or this forum were so very slightly different from the ones PW needed.  Once I had deleted them all and replaced them in the editor in PW Admin everything worked perfectly.

      Thanks for your help.  Really appreciate it.

      Kind regards

      Russ

      • 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