1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

How to 'add' several records ?

Discussion in 'Community' started by linque, May 19, 2022.

  1. linque

    linque New Member

    Level: Community
    In the 'add' form, I don't find the setup to add several records in one time adding a '+' icon.
     
  2. lousyfool

    lousyfool Well-Known Member

    Level: Community
  3. linque

    linque New Member

    Level: Community
  4. lousyfool

    lousyfool Well-Known Member

    Level: Community
    Well, probably you have your primary key element (usually named "id") in the group you're trying to set repeatable, and that won't work, indeed. So, the PK must be in a different, non-repeated group.
     
  5. linque

    linque New Member

    Level: Community
    I created a new group in the same form, I moved the PK (id) in that group set Repeatable.
    Result : i've a new empty table and my app no works any more !

    upload_2022-5-20_8-59-35.png
     
  6. lousyfool

    lousyfool Well-Known Member

    Level: Community
    Not entirely sure what exactly you've done... but maybe instead of "moving id to a new, different group" you should have left the id where it is and move the elements you want to be repeatable to a new, different group (all within the same list/form/etc, of course)?
    Yes, with repeatable groups new database tables are created. That's necessary and done automatically by Fabrik.

    BTW, having repeatable groups allows you to add multiple groups of element values to one and the same record/row in one and the same form. It does not let you add multiple records/rows to a list, if that's what you want. There is no out-of-the-box function for the latter, but you could use e.g. CSV import instead.
     
  7. troester

    troester Well-Known Member Staff Member

    Level: Community
    Not sure what you mean with
    Add form = the form to add a record if you click the + button in list view?
    Why do you think there's a + button inside this form?

    You can use the repeat group feature @lousyfool mentioned to "fake" something like a multi-record add but in this case you need a dummy list and join it with "repeatable" to your list you want to add the records to (so you'll need an adddtional FK/parent_id element in your list)

    But if you want to use Fabrik's more sophisticated, not out-of-the-box features you should know what you are doing, how Fabrik is handling one-to-many and many-to-many relations etc (e.g. a Fabrik created repeat group will create a new repeat group table which is needed for a one-to-many relation or you need a list join to do it with your own tables)

    BTW:
    As you seem to be starting with Fabrik: you've seen the discussion about Fabrik and Joomla4?
     
    Last edited: May 20, 2022
    lousyfool likes this.
  8. linque

    linque New Member

    Level: Community
    Today, I've got a 'List' and when I click on 'Add', it open the 'Add Form' like it :
    upload_2022-5-20_17-33-22.png
    When I click on 'Ok', the is a new record in my table.

    I would like to know if it's possible to add several record in one time like it :
    upload_2022-5-20_17-35-9.png
     
  9. troester

    troester Well-Known Member Staff Member

    Level: Community
     

Share This Page