Without having access to your environment, I'm guessing "menu-context" is a 
variable defined somewhere else?

Then you might try:

{{$menuname$!!menu-filter-$(menu-context)$}} 

As far as I am aware, the <variable> syntax only works inside filters.

Good luck 
-- Mark

On Wednesday, January 31, 2018 at 3:46:50 AM UTC-8, TonyM wrote:
>
> Folks,
>
> Perhaps a wizz can help me?
>
> I am trying to Use a variable to name a field, from which to get its value.
>
> In this example I set the variable menu-context and call the macro
>
> I want it to return the value in the field 
> {{Testmenu-filtercode!!menu-filter-viewheader}} if it exists *NOT WORKING*
> Other wise the value in {{Testmenu-filtercode!!menu-filter}} if it exists  
> WORKING
> Otherwise the value in {{$:/PSaT/MyMenus/menufilterdefault}} if it exists  
> WORKING
>
> The key issues seems to be my syntax for the set widget 
> value={{$menuname$!!menu-filter-<menu-context>}} 
>
> Can anyone please assist?
>
> I have the below code in a test tiddler Testmenu-filtercode
>
> \define mymenufilter(menuname)
> Context:<<menu-context>><br>
> <$set name=menufilter value={{$menuname$!!menu-filter-<menu-context>}} 
> emptyValue={{$menuname$!!menu-filter}}>
> menu-filter1 = <<menufilter>>, 
> <$set name=menufilter value={{$menuname$!!menu-filter}} emptyValue=
> "{{$:/PSaT/MyMenus/menufilterdefault}}">
> menu-filter2 = <<menufilter>>
> </$set>
> </$set>
> \end
>
>
> <$set name=menu-context value=viewheader>
> Menu-context = <<menu-context>><br>
> <<mymenufilter "Testmenu-filtercode">>
> </$set>
> ...
>
>
>
> Thanks in advance
> Tony
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/db96a301-4dbd-4c91-a5d3-e4468b613e20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to