Data Generator .... WithinParent

Ingo J

Member
Hi, I am trying to define a field in a detail table as follows: Sequence(1, 1, WithinParent)

But it doesn't work, the sequence keeps incrementing (same behavior as without WithinParent) :(

According to help:
Sequence(Start, [Inc], [WithinParent])
Returns sequence numbers, starting with Start, and incrementing with Inc (which is 1 by default). For a detail table you can additionally specify the WithinParent keyword to indicate that the sequence should be reset for each parent record.

Am I doing something wrong?

Thanks in advance!
 
Hi,

On this same topic, the "WithinParent" clause doesn't seem to work if you combine the Sequence function with other functions.

Eg. I am trying to generate multiple phone numbers within a parent customer entity, and I need to populate a TelephoneType attribute which can be the text "LANDLINE" or "MOBILE" with an underscore plus a number to denote it's sequence in the list :-

Sequence(1, 1, WithinParent) --> Works fine on it's own

List('LANDLINE','MOBILE') + '_' + Sequence(1, 1, WithinParent) --> doesn't reset within parent

Can you please check this and fix if confirmed as a bug ?

Enhancement request :- Extend the use of the WithinParent clause to other functions in the Data Generator (eg. List) so we can generate a value from a list uniquely within a parent. This would allow me to do what I am trying to do above without the need to put a sequence value on the end to force uniqueness, as the data rules state you can have only one LANDLINE & MOBILE number, but you can have both together. If you can suggest another way to do what I am trying to do, then please enlighten.

Cheers,
D.
 
Back
Top