cancel
Showing results for 
Search instead for 
Did you mean: 

Validation of a single data record on the basis of multiple data records

Former Member
0 Kudos

Hello

Is it possible to validate the dependence between data records? For instance I got a field which is a part of the primary key (lets call it pk_alternative_ID) and the user is able to set the value of this field. But not every value should be allowed.

The table could look like this:

-


pk_ID | pk_alternative_ID | some_value

-


00001 | 00000000000001 | abc

00001 | 00000000000002 | abc

00001 | 00000000000004 | abc

In this example the rule for pk_alternative_ID shall be: pk_alternative is unique and it should always be incremented by 1.

So the last data record is not valid, because the pk_alternative_ID should be "00000000000003". How could I validate this?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello again

I forgot to mention one detail, it should be possible to restart counting with another pk_ID. So with the next data record the table could look like this:

-


pk_ID | pk_alternative_ID | some_value

-


00001 | 00000000000001 | abc

00001 | 00000000000002 | abc

00002 | 00000000000001 | def

00002 | 00000000000002 | def

But from the replies to my first posting, I understand it is not possible to validate this.

Nevertheless thank you for your answer.

Former Member
0 Kudos

Hi Hasim,

Looking to your requirement it seems that you want to execute validations across the entire set of records by comparing them.This is not possible presently.

A simple work around can be you can have an auto id field as

pk_alternative_ID field and validate the same

Hope it helps.

Thanks,

Minaz

Former Member
0 Kudos

Hi Hasim,

This can not be achieved in a direct way because we do not have loop concept in the expressions. From the data what can i see is making the Field AutoID will serve the purpose. But user can not modify the AutoID field.

Regards,

Jitesh Talreja