Thought I would share the code that I ultimately am likely to end up using.
This macro has a form associated with it where I fill out all of the
transcription details from the record in question. It then will create the
dictionary tiddler with the appropriate tag. No more cloning and
copying/pasting. This will greatly ease my data entry. One feature I love
about using dynamic tables is that, should I make a mistake, I can edit the
information right from the table without having to open the dictionary
tiddler itself.
\define newEntryButton()
<$vars
temp="$:/temp/$(currentTiddler)$">
Name: <$edit-text
tiddler=<<temp>>
field=name
class=fieldinput
tag=input
size=64
placeholder="pg. xxx - Name of Person in New Entry"
/>
Link: <$select tiddler=<<temp>> field=link tooltip="Select Person to
Link to">
<$list filter='[!is[system]search:description[People]]'>
<option><$view field='title'/></option>
</$list>
</$select><p/>
Born: <$edit-text
tiddler=<<temp>>
field=birth
class=fieldinput
tag=input
size=12
placeholder="yyyy-mm-dd"
/>
Birthplace: <$edit-text
tiddler=<<temp>>
field=born
class=fieldinput
tag=input
size=32
/><p/>
Moved From: <$edit-text
tiddler=<<temp>>
field=from
class=fieldinput
tag=input
size=24
/>
Moved To: <$edit-text
tiddler=<<temp>>
field=to
class=fieldinput
tag=input
size=24
/>
Date of Record: <$edit-text
tiddler=<<temp>>
field=date
class=fieldinput
tag=input
size=24
placeholder="yyyy-yyyy"
/><p/>
Circumstances or Notes:<br>
<$edit-text
tiddler=<<temp>>
field=circumstance
class=textarea
tag=textarea
/><p/>
<$button tooltip="save input" > {{$:/core/images/done-button}} Add New
Entry
<$set name="tags" filter="[<currentTiddler>]
[{$:/config/NewTiddler/Tags}]">
<$set name="line" filter="[<currentTiddler>tagging[]count[]add[1]]">
<$set name="link" filter="[<temp>get[link]]">
<$vars location={{!!location}} parish={{!!parish}}
county={{!!county}} birth=<<birth>> tidname={{{ [title<temp>get[name]] }}}>
<$action-createtiddler $basetitle=<<tidname>>
type="application/x-tiddler-dictionary" tags=<<tags>>/>
<$action-setfield $tiddler=<<tidname>> $index=Line
$value=<<line>>/>
<$action-setfield $tiddler=<<tidname>> $index=Name $value={{{
[title<temp>get[name]split[ - ]last[]] }}}/>
<$action-setfield $tiddler=<<tidname>> $field=caption
$value={{{ [title<temp>get[name]split[ - ]last[]] }}}/>
<$action-setfield $tiddler=<<tidname>> $index=Birth
$value=<<birth>>/>
<$action-setfield $tiddler=<<tidname>> $index=Born
$value=<<born>>/>
<$action-setfield $tiddler=<<tidname>> $index=From
$value=<<from>>/>
<$action-setfield $tiddler=<<tidname>> $index=To $value=<<to>>/>
<$action-setfield $tiddler=<<tidname>> $index=Circumstance
$value=<<circumstance>>/>
<$action-setfield $tiddler=<<tidname>> $index=Location
$value=<<location>>/>
<$action-setfield $tiddler=<<tidname>> $index=Parish
$value=<<parish>>/>
<$action-setfield $tiddler=<<tidname>> $index=County
$value=<<county>>/>
<$action-setfield $tiddler=<<tidname>> $index=Date
$value=<<date>>/>
<$action-setfield $tiddler=<<tidname>> $index=Link
$value=<<link>>/>
</$vars>
</$set>
</$set>
</$set>
<$action-deletetiddler $filter="[<temp>]" />
</$button>
<$button tooltip="cancel input"> {{$:/core/images/cancel-button}} Clear
Entries
<$action-deletetiddler $filter="[<temp>]" />
</$button>
</$vars>
\end
On Monday, January 25, 2021 at 5:49:59 AM UTC-7 History Buff wrote:
> Hey Tones,
>
> Thanks for the reply. That's exactly what I've been doing up to this point
> and I may continue to do so. I did what I described above more as an
> experiment and learning experience than anything else. Doing stuff like
> this is the best way to learn Tiddlywiki and its powerful features.
>
> On Sunday, January 24, 2021 at 10:43:25 PM UTC-7 TW Tones wrote:
>
>> History buff,
>>
>> Consider using the clone button on a tiddler to start with a prefilled
>> copy, then make changes.
>>
>> Tones
>>
>>
>> On Monday, 25 January 2021 at 15:18:27 UTC+11 History Buff wrote:
>>
>>> After a considerable amount of searching in the forum, I think I have
>>> learned the answer to my question. In a previous thread (
>>> https://groups.google.com/g/tiddlywiki/c/VrFXprNCxVM/m/ZMw1zS8XCAAJ), I
>>> saw that you could use the $action-setfield widget to modify/create/remove
>>> the index and values in a dictionary tiddler. That is not intuitively
>>> obvious, at least not to me. I believe I now have a path forward.
>>>
>>> On Sunday, January 24, 2021 at 1:14:46 PM UTC-7 History Buff wrote:
>>>
>>>> Here's the code I'm using to create the tiddler in the first place:
>>>>
>>>> \whitespace trim
>>>> \define newDataHereActions()
>>>> <$set name="tags" filter="[<currentTiddler>]
>>>> [{$:/config/NewTiddler/Tags}]">
>>>> <$action-sendmessage $message="tm-new-tiddler" tags=<<tags>>
>>>> type="application/x-tiddler-dictionary" caption="" text="Line:
>>>> Name:
>>>> Birth:
>>>> Born:
>>>> From:
>>>> To:
>>>> Circumstance:
>>>> Location:
>>>> Parish:
>>>> County:
>>>> Date: "/>
>>>> </$set>
>>>> \end
>>>> \define newDataHereButton()
>>>> <$button actions=<<newDataHereActions>>
>>>> tooltip={{$:/language/Buttons/NewDataHere/Hint}}
>>>> aria-label={{$:/language/Buttons/NewDataHere/Caption}}
>>>> class=<<tv-config-toolbar-class>>>
>>>> <$list filter="[<tv-config-toolbar-icons>match[yes]]">
>>>> {{$:/images/fa5/solid/database}}
>>>> </$list>
>>>> <$list filter="[<tv-config-toolbar-text>match[yes]]">
>>>> <span class="tc-btn-text">
>>>> <$text text=$:/language/Buttons/NewDataHere/Hint/>
>>>> </span>
>>>> </$list>
>>>> </$button>
>>>> \end
>>>> <<newDataHereButton>>
>>>> On Sunday, January 24, 2021 at 1:12:42 PM UTC-7 History Buff wrote:
>>>>
>>>>> Hello all,
>>>>>
>>>>> I am using dictionary tiddlers to store each of the individual lines
>>>>> from a genealogical record transcription (like a census, for instance).
>>>>> So
>>>>> far, I have been manually creating each entry in the dictionary tiddlers
>>>>> which is a rather tedious process. I then use a dynamic table to display
>>>>> the transcription.
>>>>>
>>>>> There are some things that I can't avoid entering manually such as
>>>>> individuals' names, ages, etc. However, there are some things that they
>>>>> all
>>>>> share such as address and location. I have a button already created that
>>>>> creates an individual dictionary tiddler that is tagged with the record
>>>>> that is being transcribed and I would like to be able to prepopulate
>>>>> certain indexes with fields from that record tiddler. So far, I have not
>>>>> been able to get what I want other than using fields instead of a
>>>>> dictionary tiddler which I could ultimately do. I just feel like I want
>>>>> to
>>>>> solve this so that I have a better understanding of Tiddlywiki.
>>>>>
>>>>> Thanks a bunch.
>>>>>
>>>>
--
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/390f9fcd-38cb-4b16-a4a8-a6b5685769c4n%40googlegroups.com.