hj wrote
As yet I've not found a way to give each page a unique sequential ID, but I have thought about using the date field to do this...because date is sequential! (and could help in searches)
Same here. As I wrote, using
hidden page_name =reports:%Y%m%d%H%M%S @[/m] in the form will create an YearMonthDayHourMinSec page. You can use [m]%Y-%m-%d-%H.%M.%S or other combination. The key is to use the date in Year-month-day format because sorting lexicographically happens to automagically sort by date. There is no other combination with this property. This is an old computer hack.
hj wrote
I'm interested that you use the data and sqlite plugins. What exactly do these do?
sqlite is used by data. The data plugin can only use a sqlite database. The data plugin allows to attach "data" (or "property" or "attributes") in the form of (key:value) or (key:list,of,values) pairs to a page. the pairs and the page names are stored in an sqlite database. We don't really want to know how the data plugin does that. You attach properties to a page with the
---- dataentry ----[/m] or [m]---- dataentry class ---- syntax. class is just any word you want.
Once you've attached properties to some pages, you can query those properties. That's where it becomes really interesting.
The queries produce a table, or a list of pages matching some criteria.
Let's say that each report has a
---- dataentry report ---- that contains among other things an "importance" and a "what" property. "importance" varies from 1 to 3, and "what" is the pagename of whatever is concerned by the report. On the "important-report" page, you could ask for the list of pages that have a dataenrty of class "report" and a property named "importance" whose value is 3. This would always list the most important reports. Similarily, it is possible to get all the reports that concern a given page. On any page, ask for the list of report dataentries whose "what" property is the pagename. And each page will list all reports that are related to itself.
On reports:20190402123456 page
---- dataentry report ----
importance: 3
what: foo
short description: foo is ugly
open date: 2019-04-02
----
On page important-reports :
---- datatable ----
cols : %pageid%, importance, short description
filter : %class%=report
filter : importance=3
----
On page foo, to list all the reports whose "what" attribute is foo
---- datatable ----
cols : %pageid%, importance, short description,
filter : %class%=report
filter : what=foo
----
I have a feeling I need to use them, too, but am not sure what they do and how they work. I'd like to send SOME of the data (i.e. some field values) to a database, but I don't need to send all the data (a lot of it just text). Or maybe I don't need database functionality? I'm just so unsure what the data (and struct/strata) plugins do?
I don't know the strata or struct plugin. Never used that. but the data plugin only deals with key:value pairs attached to a page. Its primary use is to create dynamic links between pages. If you need to put the data in an external database, in a format of yours, then forget about the data plugin, it is not designed to do that. It's just a great tool to create dynamic links between pages.