Question
I want create a double-bracket link to a topic whose name is based on the current
%TOPIC% name. But I only want the double bracket link if the destination topic already exists.
If the topic doesn't exist, then I want to display nothing.
For starters, just to get the CALC statement working correctly, I'm performing the test on if
%TOPIC% itself exists.
The following attempts are coming up fruitless & I'm frustrated.....
%CALC{"$IF($EXISTS(%TOPIC%), [[%TOPIC%][this topic exists]], does not exist)"}%
%CALC{"$IF($EXISTS($perTOPIC$per), [[%TOPIC%][this topic exists]], does not exist)"}%
%CALC{"$IF($EXISTS($NOP(%)TOPIC$NOP(%)), [[%TOPIC%][this topic exists]], does not exist)"}%
Environment
--
KeithHelfrich - 15 Jul 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
This is for my development of the
QuickCheckListApp, where I want to link to =%TOPIC%ChecklistItemState ... but only if it exists already.
--
KeithHelfrich - 15 Jul 2007
Testing:
-
$IF($EXISTS(DynamicDoubleBracketLink): this topic exists
-
$IF($EXISTS(Support.DynamicDoubleBracketLink): this topic exists
-
$IF($EXISTS(DoesNotExist): does not exist
-
$IF($EXISTS(Support.DoesNotExist): does not exist
As you can see, a full
web.topic name qualifier is needed. This is a bug that is fixed in the latest plugin. Upgrade to the latest plugin or use a full
web.topic qualifier.
--
PeterThoeny - 15 Jul 2007
Thanks, Peter.
Using the
web.topic qualifier works when the
%CALC% is done inside of the topic itself. But when I try to place this same calc test in a
CommentPlugin template, the result is a verbatim screen print of the calc command.
How can I do this
if topic exists test inside of a
CommentPlugin template ?
--
KeithHelfrich - 27 Jul 2007
I do not know. Seems like an inconsistency in the CommentPlugin.
--
PeterThoeny - 27 Jul 2007
OK, thanks. I have submitted
Bugs:Item4423
--
KeithHelfrich - 27 Jul 2007
Setting to answered...
--
PeterThoeny - 29 Jul 2007