{"action":"created","issue":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/2064","labels_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/2064/labels{/name}","comments_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/2064/comments","events_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/2064/events","html_url":"https://github.com/Jermolene/TiddlyWiki5/issues/2064","id":115718411,"number":2064,"title":"virtual fields","user":{"login":"tobibeer","id":97566,"avatar_url":"https://avatars.githubusercontent.com/u/97566?v=3","gravatar_id":"","url":"https://api.github.com/users/tobibeer","html_url":"https://github.com/tobibeer","followers_url":"https://api.github.com/users/tobibeer/followers","following_url":"https://api.github.com/users/tobibeer/following{/other_user}","gists_url":"https://api.github.com/users/tobibeer/gists{/gist_id}","starred_url":"https://api.github.com/users/tobibeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobibeer/subscriptions","organizations_url":"https://api.github.com/users/tobibeer/orgs","repos_url":"https://api.github.com/users/tobibeer/repos","events_url":"https://api.github.com/users/tobibeer/events{/privacy}","received_events_url":"https://api.github.com/users/tobibeer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-08T08:52:41Z","updated_at":"2015-11-22T21:23:50Z","closed_at":null,"body":"To cater for #2063, with efficient caching in mind, introduce *virtual fields* that are not actual fields of tiddlers but rather — perhaps on the basis of a filter expression — are more like \"formula fields\" that store / cache their computational output with respect to each tiddler.\r\n\r\nThey could be addressed via TextReferences like so:\r\n\r\n```\r\n{{!!!count-tagging}}\r\n```\r\n\r\nFor each virtual field, there should be a way to configure:\r\n\r\n* a virtual field name\r\n    * `count-tagging`\r\n* a filter expression specifying the kind of \"formula\" defining how the virtual field is computed\r\n    * `[<currentTiddler>tagging[]count[]]`\r\n* perhaps a filter expression specifying tiddlers to which the formula is applied\r\n\r\nThis would also provide a flexible basis catering for tabular displays that allow column-wise sorting / filtering, instead of recalculating the fields at every possible turn.\r\n\r\nFor efficiency, it may be needed to not have those constantly live-updated but at defined moments."},"comment":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/comments/158800762","html_url":"https://github.com/Jermolene/TiddlyWiki5/issues/2064#issuecomment-158800762","issue_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/2064","id":158800762,"user":{"login":"tobibeer","id":97566,"avatar_url":"https://avatars.githubusercontent.com/u/97566?v=3","gravatar_id":"","url":"https://api.github.com/users/tobibeer","html_url":"https://github.com/tobibeer","followers_url":"https://api.github.com/users/tobibeer/followers","following_url":"https://api.github.com/users/tobibeer/following{/other_user}","gists_url":"https://api.github.com/users/tobibeer/gists{/gist_id}","starred_url":"https://api.github.com/users/tobibeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobibeer/subscriptions","organizations_url":"https://api.github.com/users/tobibeer/orgs","repos_url":"https://api.github.com/users/tobibeer/repos","events_url":"https://api.github.com/users/tobibeer/events{/privacy}","received_events_url":"https://api.github.com/users/tobibeer/received_events","type":"User","site_admin":false},"created_at":"2015-11-22T21:23:50Z","updated_at":"2015-11-22T21:23:50Z","body":"An alternative to using evaluated filter expressions, especially with respect to mathematical formulas, could be to actually use widget syntax, as is the case for the calc widget from https://github.com/mklauber/tiddly-mathjs."}}