This question about Topic Markup Language and applications: Asked
Generating a history derived from a daily form submission
I have a problem that I hope someone can help me with. It's a little complicated to explain, so I've come up with a simplified version.
Each day I would like to write a forecast for the next seven days with a number of different fields. So if today is day-0, I would like to have a form that would ask for the forecast wind speed, wind direction, rainfall probability, rainfall amount etc for days 0-7, and then have the forecast relevant to each day appended to the previous forecasts in a separate topic for that day.
So if you were to look at the webpage/topic for day+1, it would have a table with the history of the six forecasts I made over the previous six days, with multiple columns for the different quantities forecast.
I am unlikely to be able to get any non-default plugins installed, so it will probably have to be based on the FormPlugin
. I think a combination of this plugin and some searches should be enough, but I'm finding it difficult to get started. What I envisage is using the form plugin for data entry, generating the topic page for the 7 day window automatically, and then populating each topic page with a bunch of clever searches. Does this sound feasible?
Any help would be much appreciated!
- 26 Mar 2015
Sounds like an interesting, if non-trivial project! (I love weather data!) I think you might find FlexFormPlugin
for useful for your task than FormPlugin
I followed the part of your use case where you said that you wanted to enter the forecast of multiple factors for 7 days. The first step of that task would be to create your data structure (i.e. your DataForms
definition) to store the data for each of 7 days.
I'm not sure I followed your statement: "have the forecast relevant to each day appended to the previous forecasts in a separate topic for that day". Did you mean simply that you'd add a new record as described above for each new day (each with a 7 day forecast), or do you envision two topics being created each day?
If you get your general drift, it's definitely doable, if not simple. The searches to generate tables as you describe will be pretty tricky. I do have a few tricks I've developed in creating applications like this where I have to juggle lots of data to create a table, but I want to make sure I understand your basic needs first. I think you'll need to become familiar with both FlexFormPlugin
as well as FilterPlugin
- 07 Apr 2015
Thanks for the response! I have made some progress since posting my question. So far I have created the form template successfully, and I am populating the data form using a html form. To cut to the chase, here's the prototype (bit of a mess sorry) I'm fiddling with:
Rather than generate the history tables using searches, I instead just use a consistent naming format for the data forms where the pages are stored and grab the fields I want directly using FORMFIELD.
So for the most part the core functionality is there. What has me stumped now is how to make a summary of the summary: I'd like one more table that would show what the most recent edits/changes were, keeping in mind some days no entries will have been made. So for the prototype example here it would be as simple as showing a single result of the most recent change. The challenge is I can't find a quick/efficient way to do this.
- 08 Apr 2015