sequence element problem

Good evening, I have another problem that I can't solve.

I set an element as "sequence element" set Affix and all.

but when I go to the form to insert a new element it gives me this error

"Field 'date_created' doesn't have a default value"

and in fact looking at the database it does not generate any data in the fabrik_sequences table
 
Can you change
1705746105108.png

->set($db->quoteName('sequence') . ' = ' . $sequence,$db->quoteName('date_created') . ' = NOW()')
 
Correction made and everything works perfectly.

another question
Is it possible to create and save the fabrik_sequences data not on the site database but on the one where I save all the form data?
 
The sequence data (sequence number including affix) is always saved in your form data (in the column of your sequence element).

The Fabrik meta table is needed to create the correct next sequence value.
 
Certain

my problem is that I have to create 2 sites that read the same data table and that increase in the same way.

if I have fabrik_sequences on two different databases it increments incorrectly
 
This is pretty corner case. You can try use the "Use PK" method (I didn't test).

Or don't use the sequence element but standard field elements and form php to create the sequence yourself on both sites.
 
Unfortunately it's not that simple

I have multiple users entering data, each user I need to have an Affix and then the increment. On the second site I have other users including some who can choose the Affix (of the first site) and therefore increase
 
As I said: You can do it yourself with form php plugins.
If you are running Fabrik with multiple connections you must know what you are doing. Fabrik doesn't support cross-joining.
Especially if you are using something like an "external data database" from two different Joomla installations.
Things like ACL handling are always related to the J! main database.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top