Hi Matthew,
It's interesting you should mention this now, as I'm just about to start
using data tiddlers in a quite different way. Maybe it might have some
application for you. Maybe you (or someone else here) will point out a flaw
in my idea that will cause me to have to rethink my solution. Either way,
it's serendipitous.
I'm intending to create a data:value1, value2, ... value*x* structure
within a dictionary tiddler, rather than sticking to the expected data:value
pair. I'll then use a custom macro to extract just the particular value
from the string that is returned from the properly formed data:value pair.
For example, if I have the following data in my *foobar* tiddler :
foo: red,square,37
bar: blue,circle,12
baz: green,triangle,29
...I should be able to do a normal request of *{{foobar##baz}}* which will
return the string "green,triangle,29". I can then chop that string up in a
macro, using text manipulation tools to find the first, second, and third
element, using a macrocall something like...
<$macrocall $name="decombobulate" foobarstring=*{{foobar##baz}}*
returnvalue="2" />
At least, that's the theory of it. I haven't tried it out for real yet. I'm
intending to do this for the TiddlyCRM
<https://groups.google.com/forum/#!searchin/tiddlywiki/CRM/tiddlywiki/9PSw_3OsyyE/qsq9prjaHgAJ>
project I'm working on for the *{{DesignWrite}}*
<https://dl.dropboxusercontent.com/s/tk91wqty552z6z1/designwrite.html>
course semester project
<https://dl.dropboxusercontent.com/s/tk91wqty552z6z1/designwrite.html?dl=0#SemesterProject>.
I don't know if that will be useful for you as well, Matthew, but I'll put
it out there anyway. All feedback gratefully accepted.
Hegart.
On Monday, 28 March 2016 00:30:49 UTC+13, Matthew Petty wrote:
>
> I am exploring the use of data dictionary tiddlers, and they seem to be
> very useful as a way of having data stored in the text of a tiddler, rather
> than in a field or tag.
>
> Here's my thought process -
>
> - I work on multiple projects in my company, each with a job number,
> WBS code etc. I have a tiddler with a list of these codes.
> - I turned it into a table in the tiddler, before realising it would
> be better to have each project code in a separate tiddler.
> - First I had each tiddler contain the syntax for a table row: "| A |
> B | C |". But this didn't work when I used a list to return them.
> - I could have put the HTML tags in, but then I remembered data
> tiddlers.
> - OK, now I have a data tiddler for each project, with the following
> values:
>
> jn_company:[[THIS]]
> jn_project:[[THAT]]
> jn_number:648021
> jn_WBS:10003
> jn_cc:0089
> jn_ct:07
> jn_task:000
> jn_fnct:00
>
> - By the way, it's nice that a value can be a wiki link.
> - So now I can do a list of all the data tiddlers called "Job Number:
> xxx", using the following syntax:
>
>
> <$list filter="[prefix[Job Number:]]">
>
> *{{##jn_company}}
> *{{##jn_project}}
> *{{##jn_number}}
> *{{##jn_WBS}}
> *{{##jn_cc}}
> *{{##jn_ct}}
> *{{##jn_task}}
> *{{##jn_fnct}}
> </$list>
>
> - But typing out all the text references got a bit tedious.
> - So the question is, is there a way to go through all the text
> references in order and return their values? Then I could do a macro which
> would return a row of a table, without having to specify the text
> references.
>
>
> Sorry for the long post, but I wanted to give some background. Feel free
> to point out errors in the above.
>
>
> Thanks,
>
> Matthew
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/074193fc-580c-47a6-b18d-4fa9699ff643%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.