Hi all,

Having problems constructing a string from various components. The output 
I'm looking for would be in this format (literal = to be stored in a 
tiddler field):

{"31ada977-900e-4751-8549-8320014ab42f":{"to":"45e0e73a-0bdb-4a18-8452-8fdb59407bc6","type":"Subtask
 
Of"}}


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 spaces

The output I get is:

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.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/87ed32ae-07bd-4e3b-9938-e9d9be87a293%40googlegroups.com.

Reply via email to