action-setfield not changing value

31 views
Skip to first unread message

MagoArcade

unread,
Sep 1, 2019, 6:26:31 AM9/1/19
to TiddlyWiki
Hi all, below is the heavliyt abridged code:

\define NodePath()
$
:/plugins/felixhayashi/tiddlymap/graph/views/$(DDView)$/filter/nodes
\end

\define NodePathItem()
$
(orignodevalue)$ [field:tmap.id[$(tmapid)$]]
\end

<$set name="orignodevalue" tiddler=<<NodePath>> field=filter>

<$button>Go!
<$action-setfield $tiddler="<<NodePath>>"
filter
="<<NodePathItem>>"/>
</$button>

NodePath: <<NodePath>>

NodePathItemFilter: <<orignodevalue>>

NodePathItem: <<NodePathItem>>

</
$set>

Assume "DDView" = "TestView" and "tmapid" = "dbd1a36a-7252-45cf-917c-e67c07d72032"

This renders as:

NodePath: $:/plugins/felixhayashi/tiddlymap/graph/views/TestView/filter/nodes

NodePathItemFilter: [field:tmap.id[6108ab72-75cd-4666-83b2-c457035032f2]] [field:tmap.id[68e33975-5d2e-461a-bbdc-4e28664f4fa9]] [field:tmap.id[9d610d4e-d8af-46f8-95d6-b4994f7ae1b8]] [field:tmap.id[31844828-2c8b-4d6b-a46d-afd8e58d0324]]

NodePathItem: [field:tmap.id[6108ab72-75cd-4666-83b2-c457035032f2]] [field:tmap.id[68e33975-5d2e-461a-bbdc-4e28664f4fa9]] [field:tmap.id[9d610d4e-d8af-46f8-95d6-b4994f7ae1b8]] [field:tmap.id[31844828-2c8b-4d6b-a46d-afd8e58d0324]] [field:tmap.id[dbd1a36a-7252-45cf-917c-e67c07d72032]]

But it doesn't update the "filter" field in "$:/plugins/felixhayashi/tiddlymap/graph/views/TestView/filter/nodes"

What's wrong with this code?

PMario

unread,
Sep 1, 2019, 6:52:23 AM9/1/19
to TiddlyWiki
Hi,
Did you try:

<$button>Go!
<$action-setfield $tiddler=<<NodePath>>
filter=<<NodePathItem>>/>
</$button>


See the removed quotes.

I didn't test anything. just a guess.

-m

TonyM

unread,
Sep 1, 2019, 8:29:00 AM9/1/19
to TiddlyWiki
Sometimes wrapping the field manipulation with the fieldmangler widget is the answer.

I am not sure when but try it.

MagoArcade

unread,
Sep 1, 2019, 8:30:12 AM9/1/19
to tiddl...@googlegroups.com
Perfect, thanks @ PMario
Reply all
Reply to author
Forward
0 new messages