select widget from remote field list to set different remote field

38 views
Skip to first unread message

Dave

unread,
Feb 20, 2017, 11:22:46 PM2/20/17
to TiddlyWiki
Hi, I'm trying to modify this select widget:

<$set name=myfield value=myvar>
<$select field=<
<myfield>>>
<$list filter="[[LumbarKemps]get[plist]]">
<$list filter=<
<currentTiddler>>>
<option value=<
<currentTiddler>>><$text text=<<currentTiddler>>/></option>
</$list>
</$list>
</$select>
</$set>


The way this currently works is that it gets the list of options from the field "plist" in the tiddler [[LumbarKemps]], and whatever is selected in the dropdown list is put into the field "myvar", but its set in the *current tiddler*.

I've been trying to change it so that it sets into the field "myvar" in the [[LumbarKemps]] tiddler, by replacing one of the <<currentTiddler>> instances with "[[LumbarKemps]]", but none of it works.

Can someone let me know what I'm doing wrong?


thanks,
Dave

Eric Shulman

unread,
Feb 20, 2017, 11:52:16 PM2/20/17
to TiddlyWiki
On Monday, February 20, 2017 at 8:22:46 PM UTC-8, Dave wrote:
<$set name=myfield value=myvar>
<$select field=<
<myfield>>>
<$list filter="[[LumbarKemps]get[plist]]">
<$list filter=<
<currentTiddler>>>
<option value=<
<currentTiddler>>><$text text=<<currentTiddler>>/></option>
</$list>
</$list>
</$select>
</$set>

The way this currently works is that it gets the list of options from the field "plist" in the tiddler [[LumbarKemps]], and whatever is selected in the dropdown list is put into the field "myvar", but its set in the *current tiddler*.

I've been trying to change it so that it sets into the field "myvar" in the [[LumbarKemps]] tiddler, by replacing one of the <<currentTiddler>> instances with "[[LumbarKemps]]", but none of it works.

Try this:

<$set name=myfield value=myvar>
<$select tiddler="LumbarKemps" field=<
<myfield>>>

<$list filter="[[LumbarKemps]get[plist]]">
<option value=<<currentTiddler>>><$text text=<<currentTiddler>>/></option>

</$list>
</$select>
</$set>

1) Add tiddler="LumbarKemps" to the $select widget
2) The inner <$list filter=<<currentTiddler>>> is not needed.

enjoy,
-e
Eric Shulman
TiddlyTools: Small Tools for Big Ideas (tm)
InsideTiddlyWiki: The Missing Manuals 

Dave

unread,
Feb 21, 2017, 12:02:07 AM2/21/17
to TiddlyWiki
Thank you - that made a long button with all the list as one single option, but when I did this:

<$set name=myfield value=myvar>
<$select tiddler="LumbarKemps" field=<
<myfield>
>>

<$list filter="[[LumbarKemps]get[plist]]">
<$list filter=<<currentTiddler>>>
<option value=<
<currentTiddler>>><$text text=<<currentTiddler>>/></option>
</$list>
</$list>
</$select>
</$set>

i.e. with your suggestion but with both list filters it worked perfectly :)

Thanks for your help!

Reply all
Reply to author
Forward
0 new messages