How? Change tableview source to custom SQL query
Posted: 2021-08-22 10:37
Hi,
I would like to have the tableview not based on the actual table anymore, but I want to include some fields from linked (child) tables as well.
Thus I figure, I would need to change the source of TV to my custom SQL query AND I will need to change table headers as well: I will need a header/label for all fields in my custom query.
Could someone please point me a way (which file is best/the only I need to change)?
Is it maybe the root/tablename_view.php file only?
If so - is it possible to overwrite the code (variables) using a hooks file, so, that I will not need to repeat changes after regeneration of the application?
Why? The TV is being used as the most informative page which enables the user to search for things that are usually found in child tables only. Also the CSV export of the parent table can then include the fields from children which enables easy analysis using for example Excel.
Thank you already
Olaf
I would like to have the tableview not based on the actual table anymore, but I want to include some fields from linked (child) tables as well.
Thus I figure, I would need to change the source of TV to my custom SQL query AND I will need to change table headers as well: I will need a header/label for all fields in my custom query.
Could someone please point me a way (which file is best/the only I need to change)?
Is it maybe the root/tablename_view.php file only?
If so - is it possible to overwrite the code (variables) using a hooks file, so, that I will not need to repeat changes after regeneration of the application?
Why? The TV is being used as the most informative page which enables the user to search for things that are usually found in child tables only. Also the CSV export of the parent table can then include the fields from children which enables easy analysis using for example Excel.
Thank you already
Olaf