hominid4
Member
I have two lists/tables:
table_events
id | event_name
table_activities
id | event_row_id | activity_name | activity_date
'table_activities' is joined into 'table_events' (event_row_id -> id) as a repeat group.
When submitting these (for example) actities within the repeate group:
Activity 1 | 2024-01-01
Activity 2 | 2024-01-02
Activity 3 | 2024-01-03
Activity 4 | 2024-01-04
It'll submit to the Db table 'table_activities' with the correct consecutive auto-increment 'id's, however the rows of the new inserted rows within the Db 'table_activities' will be out of order, as example:
id | event_row_id | activity_name | activity_date
328 | 6 | Activity 1 | 2024-01-01
330 | 6 | Activity 3 | 2024-01-03
331 | 6 | Activity 4 | 2024-01-04
329 | 6 | Activity 2 | 2024-01-02
And therefore when I go back and edit a previous entry the repeat items within the form's repeat group will be in a different order than what I entered, being ordered by how the rows are ordered within the Db table. Within 'phpMyAdmin -> Operations -> Alter table order by: id' fixes the ordering on the front-end within the form, however on the next submit the new inserted repeat items' rows are out of order. The previous 'Alter table' rows are in the correct order, just the newly inserted rows are not.
The activities do not show in list view, only in the form.
Is this normal behaivor of repeat group items and maybe a phpMyAdmin issue? If normal, anyone have a suggestion on applying an onSumbit code that orders the repeate item rows by the 'id', or such?
Thanks!
Joomla v5.0.3
Fabrik v4.0 (release date: 2024-02-01)
table_events
id | event_name
table_activities
id | event_row_id | activity_name | activity_date
'table_activities' is joined into 'table_events' (event_row_id -> id) as a repeat group.
When submitting these (for example) actities within the repeate group:
Activity 1 | 2024-01-01
Activity 2 | 2024-01-02
Activity 3 | 2024-01-03
Activity 4 | 2024-01-04
It'll submit to the Db table 'table_activities' with the correct consecutive auto-increment 'id's, however the rows of the new inserted rows within the Db 'table_activities' will be out of order, as example:
id | event_row_id | activity_name | activity_date
328 | 6 | Activity 1 | 2024-01-01
330 | 6 | Activity 3 | 2024-01-03
331 | 6 | Activity 4 | 2024-01-04
329 | 6 | Activity 2 | 2024-01-02
And therefore when I go back and edit a previous entry the repeat items within the form's repeat group will be in a different order than what I entered, being ordered by how the rows are ordered within the Db table. Within 'phpMyAdmin -> Operations -> Alter table order by: id' fixes the ordering on the front-end within the form, however on the next submit the new inserted repeat items' rows are out of order. The previous 'Alter table' rows are in the correct order, just the newly inserted rows are not.
The activities do not show in list view, only in the form.
Is this normal behaivor of repeat group items and maybe a phpMyAdmin issue? If normal, anyone have a suggestion on applying an onSumbit code that orders the repeate item rows by the 'id', or such?
Thanks!
Joomla v5.0.3
Fabrik v4.0 (release date: 2024-02-01)