OpenPlant lookup from a database table

We would like to provide a MotoType dropdown to our users of OpenPlant so that when then place a motor on a PID, they can just pick a MotorType from a list.

We know that we can create a lookup list by adding it to the schema.  But we want to leverage the MotorType table where there already is list of MotorTypes.

Is there any way we pull the data directly from the table into OpenPlant as a dropdown/lookup list?

thanks very much

  • Quote,

    This can be accomplished by adding an External Data source Definition Mapping custom attribute to the property.

    The steps below is to add a list to Device Type Code property on Instrument but you can use this as a template for your "MotorType" requirement.

    NOTE - The current mapping custom attribute will only work with the Jet.OLEDB connection string.

    1. Locate the Device Type Code property on the Instrument class.
    2. To Device Type Code:
    1. Remove the default Value description attribute custom attribute. This will remove the default pick list.
    2. Modify or Add an ExtendType custom attribute. Edit as shown below.
    • Add an External Data source Definition Mapping custom attribute. Fill it in as shown below.

    Now when you insert an instrument and pick on the Device Type Code drop down list, the values will be coming from the Schema.mdb, ins_pick table.

    I hope this helps,

    Tony DeRosa

    Bentley Plant

     

    Tony DeRosa

    Senior Consultant

    Bentley Plant