{"31ada977-900e-4751-8549-8320014ab42f":{"to":"45e0e73a-0bdb-4a18-8452-8fdb59407bc6","type":"Subtask Of"}}
\define TmapEdgesGen(tmapid reltype)
{"{{{ [[]make[%uuid%]] }}}":{"to":"$tmapid$","type":"$reltype$"}}
\end
....
<$select field="SearchTermDD" class="tw-edit-texteditor myTextEdit">
<$list filter="[regexp:<SearchTermWikid>]" emptyMessage="No Results" >
<option value=<<currentTiddler!!title>>><$view field='title'/></option>
....
<$select field="rel_type" class="tw-edit-texteditor myTextEdit">
<$list filter="[[$:/_DTrelTypes]indexes[]sort[title]]" variable="key">
<$set name="val" filter="[[$:/_DTrelTypes]getindex<key>]">
<option value=<<key>>><<key>></option>
....
<$set name="parentmapid" tiddler={{!!SearchTermDD}} field=tmap.id>
<$wikify name="tmaprelwikid" value="""<<TmapEdgesGen <<parentmapid>> {{!!rel_type}} >>""" >
DEBUG
ParentMapID: <<parentmapid>>
RelTypeID: {{!!rel_type}}
Tmap.rels: <<tmaprelwikid>>
DEBUG
ParentMapID: 1bad2a3f-e5d7-4923-8bb1-73e2cdd36314
RelTypeID: Idea About
Tmap.rels:
I.e. nothing in <<tmaprelwikid>>
I've messed around with various permutations of brackets and quotes - cannot find anyway to get this working.
Any help appreciated.
My heavily abridged code:
\define TmapEdgesGen(tmapid reltype)
{"{{{ [[]make[%uuid%]] }}}":{"to":"$tmapid$","type":"$reltype$"}}
\end
....
<$select field="SearchTermDD" class="tw-edit-texteditor myTextEdit”>
<$list filter="[regexp:<SearchTermWikid>]" emptyMessage="No Results" >
<option value=<<currentTiddler!!title>>><$view field='title’/>
</option>
....
<$select field="rel_type" class="tw-edit-texteditor myTextEdit">
<$list filter="[[$:/_DTrelTypes]indexes[]sort[title]]" variable="key">
<$set name="val" filter="[[$:/_DTrelTypes]getindex<key>]">
<option value=<<key>>><<key>></option>
....
<$set name="parentmapid" tiddler={{!!SearchTermDD}} field=tmap.id>
<$wikify name="tmaprelwikid" value="""<<TmapEdgesGen <<parentmapid>> {{!!rel_type}} >>""” >
DEBUG
ParentMapID: <<parentmapid>>
RelTypeID: {{!!rel_type}}
Tmap.rels: <<tmaprelwikid>><<!!rel_type>> can contain spaces<<parentmapid>> will never contain spacesThe output I get is:DEBUGParentMapID: 1bad2a3f-e5d7-4923-8bb1-73e2cdd36314
RelTypeID: Idea About
Tmap.rels:
I.e. nothing in <<tmaprelwikid>>
I've messed around with various permutations of brackets and quotes - cannot find anyway to get this working.
Any help appreciated.
--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/87ed32ae-07bd-4e3b-9938-e9d9be87a293%40googlegroups.com.
\define TmapEdgesGen()
{"$(randrelid)$":{"to":"$(parentmapid)$","type":"$(reltype)$"}}
\end
....
<!-- ADD NEW TIDDLER -->
<$vars reltype={{!!rel_type}}
randrelid={{{ [[]make[%uuid%]] }}}
itemid={{{ [[]make[%uuid%]] }}}
desctext={{$:/_opNodeDetsEditText!!text}}>
<$set name="parentmapid" tiddler={{!!SearchTermDD}} field=tmap.id>
<$wikify name="myfinal" text=<<final>> >
DEBUG
ParentMapID: <<parentmapid>>
RelType: <<reltype>>
From Macro: <<TmapEdgesGen>>
<$button popup="bob" >Create Item
<$action-setfield $tiddler="$:/_opTaskStore"
itemTitle=<<myfinal>>
desctext={{$:/_opNodeDetsEditText!!text}}
/>
<$action-setfield $tiddler="$:/_opEditNode"
item.id=<<itemid>>
shorttext={{$:/_opTaskStore!!taskname}}
description=<<desctext>>
tags={{$:/_opTaskStore!!tags}}
nodetype= {{!!nodetype}}
createdby={{!!createdby}}
managedby={{!!managedby}}
owner={{!!owner}}
assignedto={{!!assignedto}}
taskstatus={{!!taskstat}}
taskpercentage={{$:/_opTaskStore!!taskpercentage}}
color={{$:/_opTaskStore!!color}}
startdate= {{$:/_opTaskStore!!startdate}}
duedate = {{$:/_opTaskStore!!duedate}}
stalldate = {{$:/_opTaskStore!!stalldate}}
completiondate = {{$:/_opTaskStore!!completiondate}}
tmap.edges=<<TmapEdgesGen>>
/>
<$action-setfield $tiddler="$:/_opEditNode"
title=<<myfinal>>
tmap.id={{{ [[]make[%uuid%]] }}}
/>
<$reveal type='popup' state='bob' position='below'>
<div style='background-color:lightgreen'>
New Item created successfully:<br>
{{$:/_opTaskStore!!itemTitle}}<br>
<$link to={{$:/_opTaskStore!!itemTitle}}>Click to View</$link>
</div>
</$reveal>
<$action-setfield $tiddler="$:/_opTaskStore"
taskname=""
tags=""
taskpercentage=0
/>
<$action-setfield $tiddler="$:/_opNodeDetsEditText"
text=""
/>
</$button>
</$wikify>
</$set>
</$vars>