Hi again , can this work for drop downs as well ? so if i have something like this
<$select field="blocker"…> <$list filter='[!is[system]!status[completed]tag[task]sort[title]]'> <option><$view field= 'title'/></option> </$list> </$select> can i get the value chosen from the drop list to populate with brackets in the "blocker field " ? On Friday, June 11, 2021 at 12:04:53 AM UTC+2 paulgilbert2000 wrote: > Thanks Eric, > > works very well:) > > @ tones thanks for the suggestion , was not exactly what i am looking for > , but very good to know about, will def be using too !! > > thank again every one > > On Wednesday, June 9, 2021 at 6:23:01 AM UTC+2 Eric Shulman wrote: > >> On Tuesday, June 8, 2021 at 7:03:17 PM UTC-7 [email protected] >> wrote: >> >>> One more thing if possible , the field part somefield, i need to >>> transclude a value there with spaces >>> somefield={{!!title}} >>> and i cant add brackets , because this turns it into a string >>> [[{{!!title}}]] >>> >> Is there any way to insert the value enclosed in brackets ? >>> >> >> So... let's say you have a title of "Foo Bar Baz" (i.e., text containing >> spaces). Then, when you create a new tiddler using somefield={{!!title}}, >> the resulting value of somefield will still be "Foo Bar Baz" (i.e., a >> single text value containing spaces). For almost all purposes, this will >> be sufficient, and subsequent references to {{!!somefield}} will still >> result as a single text value containing spaces. Nonetheless, it still >> possible to save the field value including added brackets, so that it will >> be stored as "[[Foo Bar Baz]]". Here's one method for adding the brackets: >> >> <$button> click me >> <$vars lb="[[" rb="]]"> >> <$action-createtiddler $basetitle="SomethingNew" text="yabba dabba >> doo!" tags="foo bar baz" caption="this is a caption" somefield={{{ >> [{!!title}addprefix<lb>addsuffix<rb>] }}} /> >> </$vars> >> </$button> >> >> Notes: >> * The $vars defines two variables that contain the literal "[[" and "]]" >> text >> * The somefield parameter value is then assembled using "filtered >> transclusion" to add the brackets before and after the {!!title} value. >> * The $vars is needed because you can't use literal square brackets as >> text within the filter syntax, since they would be interpreted as part of >> the filter syntax itself (i.e., you can't write ...addprefix[[[]... or >> ...addsuffix[]]]...) >> >> Another way to achieve this is to use macros instead of $vars to define >> the lb and rb variables, like this: >> \define lb() [[ >> \define rb() ]] >> >> <$button> click me >> <$action-createtiddler $basetitle="SomethingNew" text="yabba dabba >> doo!" tags="foo bar baz" caption="this is a caption" somefield={{{ >> [{!!title}addprefix<lb>addsuffix<rb>] }}} /> >> </$button> >> >> enjoy, >> -e >> > -- 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/30fbbbfd-f16d-4130-b1af-bb2995fef1d2n%40googlegroups.com.

