Skip to main content
Kinetic Community

Bridge Model Mapping

The model_mapping function is used to create a Bridge Model Mapping.

Details

The model_mapping function is a root function in KURL.  Meaning that it is not called within a code block passed to another function.

Below are the functions available within the model_mapping function.

name Sets the name attribute of the Bridge Model Mapping.  This attribute is required.  This attribute must be unique among other Bridge Model Mappings.
model_name Sets the model name attribute of the Bridge Model Mapping.  This attribute is required.
bridge_name Sets the bridge name attribute of the Bridge Model Mapping.  This attribute is required.
structure Sets the structure attribute of the Bridge Model Mapping.  This attribute is required.
status Sets the status attribute of the Bridge Model Mapping.  This attribute has 2 valid values "Active" and "Inactive".  This attribute defaults to "Active" if not set.
qualification_mapping Creates a Bridge Qualification Mapping and relates it to the Bridge Model Mapping.
attribute_mapping Creates a Bridge Attribute Mapping and relates it to the Bridge Model Mapping.

Bridge Attribute Mapping

The attribute_mapping function is used to create a Bridge Attribute Mapping.  This function is available within the code block passed to the model_mapping function above.

Below are the functions available within the attribute_mapping function.

attribute_name Sets the attribute name attribute of the Bridge Attribute Mapping.  This attribute is required.  This attribute must be unique among other Bridge Attribute Mappings related to the same Bridge Model Mapping.
field_mapping Sets the field mapping attribute of the Bridge Attribute Mapping.  This attribute is required.

Bridge Qualification Mapping

The qualification_mapping function is used to create a Bridge Qualification Mapping.  This function is available within the code block passed to the model_mapping function above.

Below are the functions available within the qualification_mapping function.

qualification_name Sets the qualification name attribute of the Bridge Qualification Mapping.  This attribute is required.  This attribute must be unique among other Bridge Qualification Mappings related to the same Bridge Model Mapping.
query Sets the query attribute of the Bridge Qualification Mapping.  This attribute is required.

Examples

model_mapping {                                   # Create a new model mapping
  name "Person"                                   # Name the model mapping
  model_name "Person"                             # Set the model name
  bridge_name "Local ARS"                         # Set the bridge name
  structure "KS_SAMPLE_People"                    # Set the structure
  attribute_mapping {                             # Create an attribute mapping for this model mapping
    attribute_name "First Name"                   # Set the attribute name
    field_mapping "<%=field[\"FirstName\"]%>"     # Set the field mapping
  }
  attribute_mapping {                             # Create another attribute mapping
    attribute_name "Last Name"                    # Set the attribute name
    field_mapping "<%=field[\"LastName\"]%>"      # Set the field mapping
  }
  qualification_mapping {                         # Create a qualification mapping for this model mapping
    qualification_name "By Name"                  # Set the qualification name                                              
    # Set the query, it is given a remedy query that references  the First Name and Last Name parameters
    query "'FirstName'=\"<%=parameter[\"First Name\"]%>\" AND 'LastName'=\"<%=parameter[\"Last Name\"]%>\""
  }
  qualification_mapping {                         # Create another qualification mapping
    qualification_name "All"                      # Set the qualification name
    query "1=1"                                   # Set the query, it returns every record
  }
}

This example demonstrates the user of the model_mapping, attribute_mapping, and qualification_mapping functions described above.