What is Datasource Object Mappings?
Using DataSource Object Mapping, one can define the relationship between tables primarily used for LOVs.
Say we have a DataSource for Employee table and create a Grid based on the same. The DeptId on the Employee DataSource would be a number field with values say 10, 20 etc. Instead if we want to display the Department Name from the Department table, Datasource Object Mapping comes handy.
How to define a Datasource object mappings?
- Once Datasource Object is created for a particular screen, go to Navigation →Rapapp Administration → Datasource Object Mappings as follows.
- Once you follow the above navigation, the following screen will be appearing to create new object mapping.
- Click the New icon to define new Object mapping. You need to provide the following details to define a Object mapping.
- The default value for ‘Type’ is LOV, check Active and click icon.
- Once object mapping has been created then you need to do the mapping columns configurations.Click the icon to define mapping columns. If you want to create a Object mapping, atleast you need to define two mapping columns entries.
- Select Attribute, Reference Attribute, and Join Type from the respective dropdown windows.
- As a second entry for object mappings, you need to provide the reference attribute and the return value for Join Type. No need to provide the source attributes value. The second entry represents the value you are looking for in the Referenced Object.
Adding multiple return value attributes in Object mappings:
- You can configure a datasource object mapping with multiple return values to use in LOVField Creation. This feature is useful when you want to change return value based on the selection of entries in LOVField. To avail multiple return values you need to add return value mapping columns.