We have a situation where the value in the source system (Gender) will need to be mapped to a different value in the destination system.

Example Value Lists

  • Source
    • M
    • F
  • Destination
    • Male
    • Female

This is a very useful feature and combined with the database utilization we have decided to implement this for all the list values. Our issue arises when we attempt to utilize this for value lists which have multiple source values to a single destination value.

Example Complex Value list

  • Source
    • Adopt Mother
    • Adopt Father
    • Legal Guardian
    • Step Mother
    • Step Father
  • Destination
    • Adopted Mother
    • Adopted Mother
    • Other

The system error's with unique key constraints preventing us from mapping the legal Guardian/Step Mother and Step Father to "Other" in the destination message. All examples I've found refer to simple value lists and don't seem to refer to the complex value example mentioned above. Does anyone know if this can be implemented with cross-reference or is this something that we have to create some customized code for.

有帮助吗?

解决方案

Use the Value Cross Referencing (It’s a many-to-one mapping) instead of the ID Cross Referencing (It’s a one-to-one mapping). You also get a performance benefit due to Value Cross Referencing uses caching.

See Difference between Value & Id Cross references quoted below (with minor spelling corrections).

I spent some time to know the differences between “id” and “value” cross referencing and I was able to get the below points which I thought of worth sharing.

At a high level, these two concepts will look similar. But they operate with few differences.

Value Cross Referencing

  1. These cannot me modified during run-time.

  2. This occurs between app types.

  3. This cross-referencing is commonly between enumeration fields.

  4. This uses caching mechanism. After any changes in database, we have to restart the corresponding host instances to see the changes.

  5. It’s a many-to-one mapping.

  6. The mapping is guaranteed in only one direction.

  7. When you want to use them for the reverse mapping for a value which is mapped to multiple inputs, the first value stored in the xref tables is fetched.

  8. The below mapping is allowed. So in this case , the reverse mapping may not give the expected output.

    Apple – Fruit

    Banana – Fruit

    Grape – Fruit

  9. We have to use the GetCommonValue & GetApplicationValue functoids in the maps

Id Cross Referencing

  1. These may be set at run-time. Set Common ID functoid is used for this.

  2. This occurs between appinstance types.

  3. This cross-referencing is commonly between entity unique identifiers.

  4. In this, we will hit the database for every call.

  5. It’s a one-to-one mapping.

  6. The mapping is guaranteed in both directions.

  7. Reverse mapping is always in synch with the initial mapping.

  8. The above mapping is not allowed allowed and are restricted by constraints on the Id cross reference tables.

    Apple – Fruit

    Banana – Fruit

    Grape – Fruit

  9. We have to use the GetCommonId & GetApplicationId functoids in the maps

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top