Hi Stephan,

I'm not sure I understand your question correctly, but using
*currentTiddler* as a variable operand
<http://tiddlywiki.com/#Introduction%20to%20Filters> instead of a macro
parameter, I think you can get rid of the qclink macro:

\define get_link(id)
<a href="t
estdirector:[S]our.qc.server/qcbin,MYDOMAIN,SOMETHINGELSE,%5bAnyUser%5d;2:$id$
">↗</a>
\end

<$list filter="[prefix[QC ]!sort[title]]">
  <tr>
    <td>
      <$link to=<<currentTiddler>>><$view field="title"/></$link>
      <$list filter="[title<currentTiddler>list[!!title]last[]]">
          <$macrocall $name="get_link" id=<<currentTiddler>>/>
      </$list>
    </td>
    <td><$transclude field="summary"/></td>
  </tr>
</$list>

Cheers,
Xavier.

-- Xavier Cazin

On Tue, Sep 16, 2014 at 1:35 PM, Stephan Hradek <[email protected]>
wrote:

> Hi!
>
> I started to use TiddlyWiki to keep a list of my opened tickets in HP
> Quality Center, which we use here at work.
>
> For each of those tickets, I create a tiddler "QC ###" where "###" is the
> ticket number.
>
> Now I've created a list of all tiddlers starting with "QC<BLANK>" and got
> the idea of providing a direct link to Quality Center fro this list.
>
> A Quality Center link here looks like this (some data anonymized)
>
>
> testdirector:[S]our.qc.server/qcbin,MYDOMAIN,SOMETHINGELSE,%5bAnyUser%5d;2:###
>
> As you (might) see, I require just the number ("###") not the "QC<BLANK>".
>
> The way how I solved that is to treat the tiddler title as a list and take
> the last element of that list.
>
> Unfortunately it seems to mee, I need 2 macros for this and I'm wondering
> whether or not one can shorten this, without falling back to JavaScript.
>
> Here are the 2 macros and the list I use:
>
> \define get_link(id)
> <a href="t
> estdirector:[S]our.qc.server/qcbin,MYDOMAIN,SOMETHINGELSE,%5bAnyUser%5d;2:$id$
> ">↗</a>
> \end
>
> \define qclink(id)
> <$list filter="[[$id$]list[!!title]last[]]">
> <$macrocall $name="get_link" id=<<currentTiddler>>/>
> </$list>
> \end
>
> <$list filter="[prefix[QC ]!sort[title]]">
>   <tr>
>     <td>
>       <$link to=<<currentTiddler>>><$view field="title"/></$link>
>       <$macrocall $name="qclink" id=<<currentTiddler>>/>
>     </td>
>     <td><$transclude field="summary"/></td>
>   </tr>
> </$list>
>
>
>
>  --
> 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 post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to