Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Forum Change Attribute
    • Sign In

    • State Verified Answer
    • Replies 4 replies
    • Subscribers 58 subscribers
    • Views 2322 views
    • Users 0 members are here
    • Attributes

    Change Attribute

    Gerald Piotrowski
    Offline Gerald Piotrowski over 9 years ago

    I need some advice on the best way to achieve the follow task. Any and all comments are greatly appreciated.

     

    What I need to do is this, set the value of one attribute based off the parsed value of a different attribute.  For example if I have a attribute called "Sht Ref No" I want to parse its value "CG-101" to come up with "CG". Then I want to set the vlaue of "Index Seq. No" to "3.3".

     

    Thanks,

    Gerald Piotrowski

    • Sign in to reply
    • Cancel
    Parents
    • David Nicholson
      0 Offline David Nicholson Wed, May 28 2014 8:13 AM

      Gerald,

      Peter Willmen kindly responded to a similar question I had only recently

      You could try the following as a SELECT update function:-  SELECT Left('$Sht Ref No$',2)

      Not sure what you mean by:  Then I want to set the vlaue of "Index Seq. No" to "3.3".   Can you provide more explanation?

      Regards,  David

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Reply
    • David Nicholson
      0 Offline David Nicholson Wed, May 28 2014 8:13 AM

      Gerald,

      Peter Willmen kindly responded to a similar question I had only recently

      You could try the following as a SELECT update function:-  SELECT Left('$Sht Ref No$',2)

      Not sure what you mean by:  Then I want to set the vlaue of "Index Seq. No" to "3.3".   Can you provide more explanation?

      Regards,  David

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    Children
    • Gerald Piotrowski
      0 Offline Gerald Piotrowski Wed, May 28 2014 11:38 AM in reply to David Nicholson

      David,

      The parsed information from the "Sht Ref No" tells me what Disciple I am dealing with, and then from there I need to update/set the attribute "Index Seq. No" to a predefined number (see table below).

      So based on the table below, if the parsed information from "Sht Ref No" is "G-" the the value for "Index Seq. No" would be "1.0" or if the parsed information from "Sht Ref No" is "H-" the the value for "Index Seq. No" would be "2.0".

       

      Discipline

      Designator

      Index Seq. No

      Description

      Content

      General

      G-

      1.0

      All General

      All or any portion of subjects in the following

      Level 2 Designators

      GC

      1.1

      General Contract

      Phasing, schedules, contractor staging areas, fencing, haul routes, erosion control, temporary and special requirements

      GI

      1.2

      General Information

      Drawing index, code summary, symbol legend, orientation maps

      GR

      1.3

      General Resource

      Photographs, soil borings

      Hazardous Materials

      H-

      2.0

      All Hazardous

      Materials

      All or any portion of subjects in the following

      Level 2 Designators

      HA

      2.1

      Asbestos

      Asbestos abatement, identification, or containment

      HC

      2.2

      Chemicals

      Toxic chemicals handling, removal, or storage

      HL

      2.3

      Lead

      Lead piping or paint removal

      HP

      2.4

      PCB

      PCB containment and removal

      HR

      2.5

      Refrigerants

      Ozone depleting refrigerants

       So I am looking for advice on the best way to achive the result (ie Lookup table, or just a SQL statement). Hopefull this explains it a little better.

      Thanks,

      Gerald Piotrowski

      Thanks,

      Gerald Piotrowski

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Cancel
    • Peter Willmen
      0 Offline Peter Willmen Thu, May 29 2014 4:18 AM in reply to Gerald Piotrowski

      Gerald,

      Personally I would use a SQL Stored Procedure rather than a SQL statement as it is more efficient and manageable (from a DB perspective)

      Whichever option you choose you will still need the lookup values in a format that you can query. I would suggest creating a new lookup environment for this.

      Your SQL statement would then be something like this:-

      SELECT IndexSeq from ENV_LOOKUP where Designator = Left('$Sht Ref No$',2)

      You could also auto-populate other attributes (e.g. description, content) from the same lookup table if you require

      Hope that is of some help

      Regards

      Pete

      Answer Verified By: Gerald Piotrowski 

      • Cancel
      • Vote Up 0 Vote Down
      • Sign in to reply
      • Verify Answer
      • Reject Answer
      • Cancel
    • Gerald Piotrowski
      0 Offline Gerald Piotrowski Thu, Jun 5 2014 4:56 PM in reply to Peter Willmen

      Pete and David,

      Thanks for the information it is greatly appreciated.

      Thanks,

      Gerald

      Thanks,

      Gerald Piotrowski

      • 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