created sequence

csantof

Member
I would like to create this function in fabrik here is the context:
a list of sites A B C
a list of machine types X Y Z
when I select 1 machine type and a site, it displays X-Y (I managed to do this thanks to the calc plugin)
after X-Y, I'd like to add a field based on 3 digits, such as 001 002 (the 0s must be visible), so that I can save the X-Y-001 sequence in a list. The constraint is that this sequence must be unique, or ideally it should propose the next number directly.

thanks for your help
happy new year
 
I have an error with tihs plungin 1364 field 'date created' doesn't have a default value
I don't think it will work with this plugin, because the counter has to be different for each type.

example:

X-A-001 X-B-001 Y-A-001
X-A-002 X-B-002
 
I have an error with tihs plungin 1364 field 'date created' doesn't have a default value
Which Fabrik version/J! version/PHP version are you running?
I don't think it will work with this plugin, because the counter has to be different for each type.
You can use placeholders, e.g. your calc element.
 
J4.4.1 and Fabrik Zeta

in my calc plugin named {nommage_machine___prefix}:

$ssite = '{nommage_machine___site}';
$stype = '{nommage_machine___machine}';

if ($ssite == "25") {
$site2 = "QYB";
} elseif ($ssite == "74") {
$site2 = "NCY";
} elseif ($ssite == "SA") {
$site2 = "GEN";
}

if ($stype == "Laptop") {
$stype2 = "L";
} elseif ($stype == "Desktop") {
$stype2 = "D";
}
$prefx = $stype2 . "-" . $site2;
return $prefx;

in my sequence plugin in affix {nommage_machine___prefix}

if I put On Load or On Submit into Method I have error 1364 field 'date created' doesn't have a default value
if I put Use PK it works but the data is {nommage_machine___prefix}001 and not the good syntax
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top