Sorry, supplemental question involving using fields¬
Another thing I want to do is use id and father-id / mother-id fields to
automatically list the children of an individual. Ids are preferable to
just names/titles, because of the chance of duplicate names.
How it might work is this. Say Robert Smith has two sons, John Smith and
Peter Smith. That could be represented in fields like this:
(John Smith fields)
id: 365974-LlO
father-id: 634750-LiR
(Peter Smith fields)
id: 571157-OnU
father-id: 634750-LiR
(Robert Smith fields)
id: 634750-LiR
father-id: 612745-GbF
Now doing this <<list-links [field:father-id[634750-LiR]]>>
Works to retrieve the children of Robert Smith. However, that involves
manually typing in Robert Smith's id. Instead I want something like
this: <<list-links [field:father-id[{{!!id}}]]>>
But that doesn't work...
On Sunday, June 27, 2021 at 10:07:48 AM UTC+1 Merry Machiavelli wrote:
> Thank you so much @Soren Bjornstad, that works perfectly! I think I tried
> something close to that at one point, I just messed up the syntax!
>
> @iamdar my use case is that I want to be able to mass-produce
> wikipedia-style bios for individuals, where the the same basic info comes
> up in multiple parts of the 'article'/tiddler.
>
> For example, in the opening line, it might say "John Smith was born in
> MadeupLand", the side bar might also mention he was born in MadeupLand. If
> I link both references to MadeupLand through a field i.e. using <$link
> to={{!!birthcountry}} /> then I only have to specify the country John Smith
> was born in once, in the field. If I iterate this process 100 times (using
> the same code for most of the body of the article, just customising it with
> novel information) it saves a lot of typing.
>
> Another advantage is that it makes it easier to call groups of people who
> share a particle bit of vital information, without necessary creating a tag
> for, say, "born in 1872" (which, I could do...it just seemed clunky?). The
> main example that comes to mind is using surnames as a way to list every
> individual from a particular patrilineal lineage (assuming it's an unusual
> surname that unrelated individuals are unlikely to share within my
> group...I could also have a specific familyID field).
>
>
>
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/1ae075b9-7506-45f0-8362-d9a9ade08920n%40googlegroups.com.