Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
ProjectWise
  • Product Communities
ProjectWise
ProjectWise Design Integration Wiki Want second attribute take first attribute date and add one day
    • Sign In
    • ProjectWise Design Integration Wiki
    • ProjectWise Software Download
    • +ProjectWise Learning
    • +Projectwise Licensing
    • ProjectWise Programming and PowerShell
    • +Projectwise Documentation
    • -ProjectWise Explorer Client
      • +ProjectWise Client
      • +Featured Articles - Projectwise Explorer
      • +Audit Trail - ProjectWise Explorer Client
      • +Bentley IMS Login
      • +BS1192 Rules Engine - ProjectWise Explorer Client
      • +Check In Dialog - ProjectWise Explorer Client
      • +Document Code - ProjectWise Explorer Client
      • +Document Creation - ProjectWise Explorer Client
      • +Documentation & Help - ProjectWise Explorer Client
      • -Environments and Attributes - PWE
        • Attribute not showing in modify command dialog box
        • Set date format for attribute fields to show in localized format
        • Unsupported - None of the attribute data is copied down
        • Want second attribute take first attribute date and add one day
      • +Export / Import Tool - ProjectWise Explorer Client
      • +Folders / Subfolders - ProjectWise Explorer Client
      • +GUI - ProjectWise Explorer Client
      • +Installation - ProjectWise Explorer Client
      • +Integration - General
      • +Integration - AutoCAD - ProjectWise Explorer Client
      • +Integration - Civil 3D - ProjectWise Explorer Client
      • +Integration - DGN Platform - ProjectWise Explorer Client
      • +Integration - MicroStation - ProjectWise Explorer Client
      • +Integration - Office - ProjectWise Explorer Client
      • +Integration - Revit - ProjectWise Explorer Client
      • +Logs Troubleshooting- ProjectWise Explorer Client
      • +Messaging Service - ProjectWise Explorer Client
      • +MISC - ProjectWise Explorer Client
      • +Open / Save / Copy / Move - ProjectWise Explorer Client
      • +Photo Preview - ProjectWise Explorer Client
      • +ProjectWise Managed Workspaces
      • +Project - ProjectWise Explorer Client
      • +Search - ProjectWise Explorer Client
      • +Security and Permissions - ProjectWise Explorer Client
      • +User Tools - ProjectWise Explorer Client
      • +Views - ProjectWise Explorer Client
      • +Workflows & States - ProjectWise Explorer Client
    • +ProjectWise Administrator
    • +ProjectWise Integration Server
    • +ProjectWise Caching Server
    • +ProjectWise Gateway Server
    • +ProjectWise User Synchronization Service
    • +ProjectWise Orchestration Framework
    • +ProjectWise Connected Services
    • +Working from Home with ProjectWise
    • +ProjectWise Glossary
    • ProjectWise Hosting - Manage Services

     
     Questions about this article, topic, or product? Click here. 

    Want second attribute take first attribute date and add one day

      Product(s): ProjectWise V8i
      Version(s): 08.11.05.37
      Area:  General
      Original Author: Bentley Technical Support Group

    Problem

    First attribute has date, want 2nd attribute take that date and add one day

    I have a user who explains her problem
    I have one attribute A, WHICH HAVE DATE... 03-jUL-09.
    I want to create another attribute B, which should be A + ONE DAY..
    The answer should be 04-Jul-09.
    Do you have a select statement for me?

    Solution

    I could not get it to work correctly with a SQL statement but you could use a trigger or stored proc.

    In my test case I set up an environment called 'mydates'
    My environment table name was mydates
    I created two attributes as either of these two data types datetime or timestamp
    And the attribute names where mydate1, mydate2

    I then created a trigger using SQL query:

    CREATE TRIGGER myDateTrig ON mydates
    FOR INSERT, UPDATE
    AS
    UPDATE mydates set mydate2 =
    (SELECT dateadd(day, 1, mydate1)
    FROM inserted I)
    RETURN

    (This trigger was created for MS SQL 2005 and may be different for Oracle)
    In ProjectWise explorer, I added a file and then went to the properties attribute tab of the file.
    I entered in a date for mydate1 and then clicked save and at that point mydate2 populated with the next days date.
    The key is that if you change mydate1 you have to hit save for mydate2 to update.

    customizing an environment is something that Bentley Professional Services should be retained to do.   If you have any further customizations then please contact Bentley Professional Services via your Bentley Account Manager.

    See Also

    Product TechNotes and FAQs

    External Links

    Bentley Technical Support KnowledgeBase

    Bentley LEARN Server

    Comments or Corrections?

    Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!

    • ProjectWise Caching Server
    • SELECTsupport
    • Share
    • History
    • More
    • Cancel
    • Elisabeth Pry Created by Bentley Colleague Elisabeth Pry
    • When: Tue, Oct 15 2013 3:58 PM
    • Dana Guthrie Last revision by Bentley Colleague Dana Guthrie
    • When: Wed, Oct 19 2022 4:04 PM
    • Revisions: 3
    • Comments: 0
    Recommended
    Related
    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