List copy plugin or Form Copy issue

jo-ka

Member
Hello.

I'm linking a list to an existing ERP table, that has an index formed by 3 fields, that must be unique on the table.

upload_2022-6-14_18-36-12.png



By using copy list plugin, or form copy button, I have an error related with that uniqueness...

upload_2022-6-14_18-38-1.png
Is there a way to have an increment on the Number filed, everytime I use list copy plugin, or form copy button?

I can't have an auto increment field, because the Number is related with SerieId and DocumentTypeId fields, this is, I can have, for example, document number 1 multiple times, depending on the Document Type and Serie Id.

Thanks in advance.
 
Is this only a unique index or a composes primary key?
Anyway
There's the seequence element but it seems to do nothing on copy.
I assume you can't use build-in Fabrik copy but must do it with php plugins.
 
Playing a bit with the sequence element: It's doing onCopy (not sure what I did before).

It should do (at least on form Copy button) with
Method = Submit
Sequence Query something like
select max(your-number-column)+1 from your-table where your-doc_type-column={your-doc-type-element} and your serie-id-column={your-serie-ide-element}
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top