Filters (Lists)

mariluzrm

Member
Hello.

I have a complex list with several joins that I display in a form with several Tabs. To access it I use a simpler list because if I show the other one, as it has many joins it takes a long time to load. I need to be able to do filters (Advanced search or otherwise) on the simple list but using the fields from the complex list. It's possible? How can I do it?

Thanks
 
So you don't have the joins existing at all in your "simple form" or you have just set the joined list groups to "display=no" or similar?

In the first case I cannot see any way to do this as the elements/fields simply do not exist in your list where you are making your search.
 
In group setting "layout" tab there is an option called "Show in form/details". In your "simplified" form you can set some groups to "yes, but hidden" and should still be able to use it's elements in list "search all" field.
 
I only want the "simplified" form to appear in the list (and also to be able to filter), it would not be better then to put "Show in form / details" = NO?

Then, the form that is shown from the list is the "complex form" and here I do show all the groups (but with a single record and this does not take long to load).

That is, what it takes to load is the "complex list", that's why I have a "simplified list", but I need to be able to filter all the fields of the "complex list" in it. I don't know if I explain myself ...
 
Last edited:
OK, then I misunderstood a bit.

In this case hide the elements from list view which you do not need to show. If the list is "slow" you can set the option per every hidden element not to include in list query (Element settings -> List view Settings -> Include in list query = No)
 
per every hidden element not to include in list query (Element settings -> List view Settings -> Include in list query = No)

Is it possible to do this for a set of elements or is it necessary do it for each element (that is, do it one by one)?

Thanks!!
 
Cannot think of any way to batch update this setting for several elements except changing this with database queries which is only recommended when you know 100% what you're doing.

If the hidden elements are not e.g. calc elements calculated on the fly ("only calc on save" set to "no"), I doubt there will be significant gain in list loading time.

You can make a test:
1) check the page loading time in browser console before setting the elements to not include in list query.
2) Then change the setting for a few elements and make the test again to see if there's any gain in page loading.

On the other hand, if you have several repeat groups in this list, this could affect the loading time quite a lot.

In this case you can make a copy of your list, remove the joins (repeat groups) from this list which you do not need to display in list view. And then in "reduced list" settings add a custom "add", "details" and "edit" link to refer to your "full" form.
 
In this case you can make a copy of your list, remove the joins (repeat groups) from this list which you do not need to display in list view. And then in "reduced list" settings add a custom "add", "details" and "edit" link to refer to your "full" form.

But in this case the elements of repeat group don't appear in avanced search, true? That was my initial problem..

(In localhost) It takes 20 seconds to load a two-column list (about 250 records), too slow. How can I speed up the load?
 
Last edited:
I seem to have lost your original point by multitasking too much :) Yes, the last approach wouldn't work if you need to search those fields.

20 seconds is definitely too much. Check for the missing indexes in these database tables and add if necessary.

Also changing list filters from "dropdown" to "field" might help when the field has a lot of different values.
 
Ok, I will try it.
Another thing, I have seen in the wiki that it is possible also search by doing a form search and using the seach plugin as well. What are the differences between these and the advanced search of the lists? Are there other ways to search or filter? Thanks for everything!!!
 
A bit off topic to these last posts:

Multiple list joins with repeat are going to create an exponentiell number of records, so be aware of enabling "Big selects" and setting memory limit high enough even if you only have the joins in your forms.

What I have done in a list where you need several repeat groups in the form view but this would crash your "full" list view:

create a MySql view to a repeat group table like

select
`person_repeat_f`.`parent_id` AS `parent_id`,
group_concat(`person_repeat_f`.`notes` separator '<br>') AS `notes`
from `person_repeat_f` group by `person_repeat_f`.`parent_id`

Then in your "slim" list (without the joins to the repeat groups) add a join (id to parent_id, repeat=no) to this view.
Now you can display and filter the "notes" in the slim list.
For form/edit view add custom links to the "full" forms.
 
This only for the list view in a "slim" list (a copy of the "full" list without joins to repeat groups), i.e only display and filtering.

For form/edit view add custom links (in the "slim" list) to the "full" forms.
 
You can have multiple Fabrik lists (created via list "Copy" or by linking a new list to an existing database table) on the same underlying database table, so it's always the identical records.
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top