on 08-29-2008 1:59 PM
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.