Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
  • Welcome
  • Products
  • Support
  • About
  • More
  • Cancel
OpenCities Map
  • Product Communities
  • Geospatial
  • OpenCities Map
  • More
  • Cancel
OpenCities Map
OpenCities Map Wiki - Concatenate properties to populate new property using Property Watcher
    • Sign in
    • -OpenCities Map Wiki
      • -OpenCities Map
        • - End of Support for Bentley Map V8i (SELECTseries) products
        • +Release Information
        • +Installation Information
        • +Getting Started
        • +Administration
        • +General Topics
        • -Geospatial Administrator
          • - About Expand Variables
          • - Automatically connect to a graphical source
          • - Base Source Directory and Files Node
          • - Base Source Directory configuration
          • - Built in XFM properties
          • - Capture point feature coordinates with two examples
          • - Change property order using text editor
          • - Changing project and workset information
          • - Concatenate properties to populate new property using Property Watcher
          • - Create a geospatial schema
          • - Create a new schema recommended workflow
          • - Customize Command Manager with help from Excel
          • - Customize dialogs
          • - Customize Operations to show property based on criteria
          • - Date Time Property Show None to set dates to null
          • - Decimal Precision in Analyze XFM Feature Results
          • - Define form fields for data entry that are not part of feature properties
          • - Defining polygons with holes or islands
          • - Domain list initial values
          • - Domain list width (Calculate List Width)
          • - Domain list width (Form View width)
          • - Feature Collection and Collection Name Property
          • - Files node in User Workspace
          • - Fix Cannot access a disposed object error
          • - Generate workspace from command line
          • - Increment property values
          • - Multiline text for PBA
          • - Number  properties and setting decimal places for data entry
          • - Open schema via desktop shortcut
          • - Property Watcher on an empty value
          • - Property Watcher to compute values
          • - Property Watcher to read Col2 of a Domain List
          • - Property Watcher to set true or false
          • - Property Watcher to update a date property
          • - Property Watchers to drive domain lists
          • - Replace text during Shapefile importing
          • - Replace text in cells using PBA with two examples
          • - Rounding numbers
          • - Set Area and Perimeter to Read Only
          • - Shortcut arguments –ws , -wr, -wu
          • - Shortcut Target path
          • - Sort properties by Display Name
          • - Store Last Value to define property fields for new feature placement
          • - Tabbed dialogs
          • - Text and Text Node Justification
          • - Text Annotation Subfeature
          • - Text features from PBA
          • - Text size settings
          • - Update property when Split/Merge used
          • - UpdatedBy and UpdatedDate properties
          • - Using raster images as a graphical source
          • - Value Col Name vs Edit Col Name
          • - Workspace location V8i compared to CONNECT Edition
        • +Interoperability
        • +Spatial Databases
        • +Spatial Analysis
        • +3D Geospatial
        • +Geographic Coordinate Systems
        • +Troubleshooting
        • +Freeware - Utilities - Applications - Programs
        • +Advanced Map Finishing
      • OpenCities Map Ultimate for Finland CONNECT Edition x64 (SES)
      • OpenCities Map Ultimate for Finland CONNECT Edition - Suomi
      • Bentley Descartes
      • +Other Geospatial Products

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

    - Concatenate properties to populate new property using Property Watcher

    This article describes how to concatenate the values of two properties to create a third.   For example, you may want to capture an asset tag property that must be entered as nn-nnn.  To accommodate this, Left and Right properties are defined which are filled-in at placement time.  The Asset Tag property is then created from the Left and Right properties as shown in the following video:

    Click here to play this video

    We will look at three solutions:

    1)  Creating Left, Right and ASSET_TAG as XFM properties

    2)  Creating ASSET_TAG as an XFM property and Left and Right as form fields by defining them as operation properties

    3)  Using operation properties for registered spatial features.

     

    Using Feature Properties 

    In the Geospatial Administrator, three properties are defined: Left, Right and ASSET_TAG.  The Left and Right property fields are set up as 2 character and 3 character strings respectively. As well, the initial values are set as 00 and 000.

    In order to populate the ASSET_TAG property, a property watcher needs to be defined.  Property watchers allow one or more properties to watch for changes in a source property (Left and Right). Each time the value changes, it triggers the value of a related property (ASSET_TAG) to respond.  Described in other words, a property watcher watches for a certain value in a source property (Left and Right) which then determines an associated pre-defined value in another property (ASSET_TAG).

    A Synch Item Watcher is used to establish relationships between different feature properties.  To set the ASSET_TAG as a concatenation between the Left and Right properties, the sync item watcher value type is set to concatstr and its value is specified as follows:

     featureName:PropertyName+'-'+featureName:PropertyName  

    For this example, the value is My_Point:Left+'-'+My_Point:Right  where:

    • My_Point is the feature name
    • Left and Right are the property names
    • - is the character between the two fields. 

    With this property watcher in place, the resulting string for ASSET_TAG becomes leftValue-rightValue

    Since ASSET_TAG is composed of Left and Right, the Right property will need a sync item watcher as well.  The last modification made, is to set ASSET_TAG as a read only field. 

    NOTE:  While this article deals with concatenating property values, the method described results in the Left and Right properties being written to the feature as XFM properties. 

    Using Operation Properties

    While using feature properties may be perfectly fine for your project, an alternate method is to define Left and Right as operation properties.  This creates form fields which are being used as place-holders for the Left and Right property values.  This eliminates the Left and Right properties from being written to the feature as XFM properties.

    To achieve this, the feature is created with the ASSET_TAG property set to read-only.

    After inserting the placement metadata, Left and Right properties are added to the Operation node as shown.

    As with the example above, you'll define a sync item property watcher, except in this case, the value to set will be defined as follows:  operationName/PropertyName+'-'+operationName/PropertyName which translates to:  My_Point/Left+'-'+My_Point/Right 

    NOTE the difference in the syntax used to define the concatstr:

    Feature properties:   featureName:PropertyName+'-'+featureName:PropertyName  

    Operation properties:  operationName/PropertyName+'-'+operationName/PropertyName

    When you insert placement metadata, the operations and methods are created from the XFM feature and its properties.  Since you're adding operation properties after the fact, the Place and Edit dialogs will need to be edited manually to include the new operation properties.  To do that, simply add two new Operation Items, one for Left and the other for Right.

    The last action item is to update the Command Manager entry for your modified feature and to test the placement.

    Registered Spatial Features

    The technique of defining operation properties can also be used for Oracle and SQL registered spatial features.  This eliminates the addition of extra properties in the database that add no value for modeling your project.

    Click here to play this video

    An example schema is attached for your learning.

    5355.Concatenate XFM.zip

     

    • SQL Server Spatial
    • Feature Properties
    • operation
    • Oracle Spatial
    • Geospatial Administrator
    • Concatenate
    • Bentley Map
    • Share
    • History
    • More
    • Cancel
    • Inga Morozoff Created by Bentley Colleague Inga Morozoff
    • When: Mon, Jun 24 2019 9:34 AM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Tue, Nov 26 2019 4:08 PM
    • Revisions: 13
    • 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

    © 2021 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies