This is related to the post regarding usage of parameter widget in procedures.
Here I am testing usage of parameter widget in procedures.
Here is the code.
\procedure dyn-table-test()
<$parameters
op-1="""<% if [{!!op-1-value}is[blank]] %> <<op-1>> <% elseif [<currentTiddler>!has[op-1-value]] %> <<op-1>> <% else %> {{!!op-1-value}} <% endif %>"""
param-1={{!!param-1-value}}
>
!!OP-1 ''<<op-1>>''
!!PARAM-1 ''<<param-1>>''
</$parameters>
\end
__First test__
<<dyn-table-test op-1:"note-subject" param-1:"rad">>
__Second test__
<<dyn-table-test op-1:"note" param-1:"tw">>
__Third test__
<<dyn-table-test>>
In the above code, I want the procedure to use parameter op-1
only if the op-1-value
field of the currentTiddler
is blank or if that field is not present. Otherwise it should use the fieldvalue op-1-value
. I tried to define that condition here
<% if [<currentTiddler>get[op-1-value]is[blank]] %>
<<op-1>>
<% elseif [<currentTiddler>!has[op-1-value]] %>
<<op-1>>
<% else %>
{{!!op-1-value}}
<% endif %>
but it is not working