I have an entity 'CLicense' with a field 'quantity'.
I am trying to have a formula to autocrate 'quantity -1' extra duplicate records when I save the original record.
Trying to use the while function:
I get error 500 when I am trying to save the original record.
It is my first time with the while function and I am a bit lost here.
I am trying to have a formula to autocrate 'quantity -1' extra duplicate records when I save the original record.
Trying to use the while function:
PHP Code:
$n = quantity -1;
$count = record\count(CLicense, "serial", serial);
while($count < $n)
{record\create(CLicense, 'licenseType',licenseType, 'kind', kind, 'serial', serial)};
It is my first time with the while function and I am a bit lost here.
Comment