cancel
Showing results for 
Search instead for 
Did you mean: 

Check the combination of 2 fields as Unique key

former_member469694
Participant
0 Kudos

All,

I am not very good in writing validations. I am using SAP MDM 7.1 SP4.

I have a requirement to check the combination of 2 fields for example "Code" + "Create date" as unique in the repository. These two fields are in the main table and this is a very simple repository that has few fields only.

When user enter data using Data Manager, duplicates should not be allowed with the same Code + Create date. 

Anyone can help me to write the Validation?

Thanks

Mike

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mike,

Ravi has already listed down the possible ways to perform the validation.

However if you are using Portal application, then it will be a good idea to use Option 4 mentioned by Ravi, because you will be able to call the assignment easily from portal.

It will be advisable to use option number 3 in case you are directly storing data in MDM through data manager or import manager. As suggested by Ravi, you need to have good sizing so that performance of the system is not affected.

But if you would like to cover all the scenarios, then option 3 is the best one if you have good sizing done. It will cover all the scenarios of Portal and manual/auto import etc.

Thanks and Regards,

Ankush

Former Member
0 Kudos

HI Mike,

There can be multiple ways to achieve this -

1.You can set this field combination as UNIQUE FIELD in Console.

Pro - This is automatically checked every time.

Con - Less flexible

2.You can have a portal code do that.

Pro - Easy and flexible.

Con - If user enters data through Data Manager/Import Manager it doesn't work.

3.You can write a calculated field which has concatenated value of these 2 fields and set this as unique in field property.

Pro - Easy and flexible.

Con -Performance can be slowed a tad but if you have good server sizing it should not be a problem.

4.Write a assignment to concatenate 2 fields in a third field.Set this as UNIQUE in console.

Pro - Easy,light weight.

Con - multiple steps.Will have to run assignments through Workflow or otherwise.

Thanks,

Ravi