There was a lot going on. Mismatched vars and list ... maybe just a paste
error.
Most importantly, in this:
<<thisField>>={{thisField}}
you're attempting to dynamically specify a field name on the left side of
an attribute. I don't believe that
is possible without a macro.
You also specify a <<thisProject>> variable, without showing where it came
from or what it means.
Also, I'm not sure if Tobias' operators work the way you're using them.
Unfortunately, there don't seem to be any simple examples
of usage on his site.
So, instead, perhaps consider using the pre-release version of TW, which
has split and join operators.
Putting this all together, the following seems to work using the
pre-release, assuming that it's ok to use another tiddler, $/temp/values
for your working
values. Note that it usually doesn't work to edit fields of the same
tiddler that you're displaying.
Personally, I think you'll avoid a lot of headaches down the road if you
don't use spaces in tag names, but maybe that's just me.
Good luck!
\define mybutton()
<$button>
Update
<$action-setfield $(thisField)$={{$:/temp/values!!$(thisField)$}}/>
</$button><br/><br/>
\end
<$list filter="[is[current]tags[]]" variable="curTag">
<$vars thisField={{{[title<curTag>split[ ]join[-]]}}} >
<<thisField>>:
<$edit-text tiddler="$:/temp/values" field=<<thisField>> />
<br/>
<<mybutton>>
</$vars>
</$list>
On Monday, July 22, 2019 at 2:42:01 PM UTC-7, Steven Schneider wrote:
>
> I have a bunch of tiddlers, and each of my tiddlers has a bunch of tags.
> For each of the tags in a tiddler, I'd like to use edit-text to create an
> opportunity to enter a value in a field named similarly to the tag
> (replacing [spaces] with [-] hyphens (thats line 2 below, replacing spaces
> with a "-" using the split and join plugins at
> https://tobibeer.github.io/tw5-plugins
> <https://tobibeer.github.io/tw5-plugins/#Welcome>)).
>
> I'm having trouble, however, writing back to the original tiddler in the
> proper field; my <$action-setfield> is not writing to the proper field.
>
> Suggestion?
>
> Thanks,
>
> //steve.
>
>
>
> <$list filter="[is[current]tags[]">
> <$vars thisField={{{[<currentTiddler>split[ ]join[-]]}}}>
>
> <<thisField>>:<br>
> <$edit-text tiddler=<<thisField>> field="text"/>
> <$button>
> Update
> <$action-setfield $tiddler=<<thisProject>> <<thisField>>={{thisField}}/>
> </$button>
> <br>
>
> I consistently get a field called <<thisField: with a value of true
>
> Clearly, I don't know how to reference either my fieldName or the value of
> the field (currently in a temp tiddler) --
>
> Suggestions?
>
> Thanks in advance,
>
> //steve.
>
>
--
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/ffb9c59e-be82-4989-be08-f8f56fa5daa2%40googlegroups.com.