Quantcast
Channel: SQL Server Master Data Services forum
Viewing all articles
Browse latest Browse all 1311

Business Rules - preventing values from being NULL

$
0
0

Hi all,

I want to create a business rule to prevent a certain field from having NULL values and raise an error or restore previous value in that case.

I have tried the rule "is required", which really prompts a validation error when NULL values are inserted. But although the entity isn't validated, the value in the field remains NULL.

For example: I have a model called "Company", entity called "Contract" and an attribute called "Category". Assume row ID #3 has "Category = High". When I apply the business rule "Category is required" on"Contract" entity and then delete the Category value of row ID #3, there is a validation error but Category value of row ID #3 remains NULL which is no good.

Is there a way to restore previous value or throw an error to the user in case NULL value is inserted? I want to completely prevent values from being NULL, even if the entity has not been validated.

Thanks in advance,

Ron.


Viewing all articles
Browse latest Browse all 1311

Trending Articles