mixed forms/views

Status
Not open for further replies.

jaga

New Member
Hello everyone,

I am using fabrik to create different lists and forms that are helping me to enter information into my database. Viewing the records and edit them is a very easy task (thanks to the forum information :)).
The last challenge that I am facing now is to create a view that should allow me to export a set several values in a csv. That view should look like in the attached picture. There is no need to edit any record in here, but just to select start/stop date and to be able to press the Export button. Is there any way to create such form/view?
I have tried to create groups for the date elements and for those from the list, but I was not able to split the form as in the picture.
export_weco.png

Any tip will be appreciated.

Best regards,
Jaga
 
In your date element's settings (List view settings -> Filters), you can change the filter type to "Range". That will allow you to select beginning and end dates for filtering. You will need to have the data element shown in your list view in order to filter on it. Then it should just be a matter of choosing what fields to export from your list which you can find in your list settings -> Publishing -> CSV.
 
In your date element's settings (List view settings -> Filters), you can change the filter type to "Range". That will allow you to select beginning and end dates for filtering. You will need to have the data element shown in your list view in order to filter on it. Then it should just be a matter of choosing what fields to export from your list which you can find in your list settings -> Publishing -> CSV.


Hello rackem,

Thank you for your answer. Unfortunately the data in that table is split in few tables like: 'tank table' where there is information on a tank, 'gas table' where there is a foreign key to the 'tank table' and some other fields and a third table 'volumes table' storing the evolution of the volume in each tank over time. It might look as a bad design splitting the data in these tables but these are some constraints that I have to deal with.
Basically the data that I have to export is from the 'volumes table' on a period of time, eventually selecting one or more tanks. I have tried a join over these 3 tables but things didn't go very (several thousands records on each tank) well and the filter was not easy to create as it should be between the minimum date on all gases and the maximum date of them.

Best regards,
Jaga.
 
If you can write the mySQL query to put all the data together properly, you could make a mySQL View out of it. Then you could make a Fabrik list pointed to that which gives you front end filtering and exporting functionality.
 
In your date element's settings (List view settings -> Filters), you can change the filter type to "Range". That will allow you to select beginning and end dates for filtering. You will need to have the data element shown in your list view in order to filter on it. Then it should just be a matter of choosing what fields to export from your list which you can find in your list settings -> Publishing -> CSV.

Hello 'rackem',

Sorry for answering with such delay. I've been traveling so I didn't have time to try your suggestion. Great idea of creating a sql view where to 'consolidate' information from other tables. I am going to use that. I do have however a small issue with this: the table that I was showing at the beginning of the thread is a summary of few tables. what I have to export are values not included in that overview and reflecting data points in time (which can be thousands). To put in that table all records in order to have access to date filtering doesn't look reasonable. That's why I was trying to show the current information on the recipients and to export data points based on a date filter. Unfortunately I do not have in the fabrik list behind the table any way to add an element to allow me creating such filter. Any thoughts?

Thanks and best regards,
Jaga.
 
Sorry Jaga, I do not have any more suggestions. I don't think the number of records you are dealing with should be a problem with the sql view approach. Fabrik's viewing and filtering is very robust.

This could probably be done with some custom code in the PHP plugin but that approach goes beyond my level of knowledge.
 
Sorry Jaga, I do not have any more suggestions. I don't think the number of records you are dealing with should be a problem with the sql view approach. Fabrik's viewing and filtering is very robust.

This could probably be done with some custom code in the PHP plugin but that approach goes beyond my level of knowledge.


Hello Rackem,

It might be that someone else is getting in a similar situation, therefore I'm providing my approach for the problem that I had. As I said at the beginning of the thread, someone might want to have additional buttons along with a fabrik form, not necessarily linked some records from a table.
What I did was:
1. Install the Sorcerer extension for Joomla
2. Create an article which will hold the content
3. Create php/javascript code and place it in the article surrounded by the <source> tags. The code will create the calendar fields and the Export button. This button will create/update as you have suggested an sql view linked to a fabrik list.
4. Embed in the article the fabrik list using the fabrik content plugin: {fabrik view=list id=14}

I believe that it will be great if some time in the future fabrik will have the possibility of adding elements not linked to a table, so one will not have to use such workarounds.

Best regards,
Jaga.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top