The function call @DBName () should be used as an array of a list. The following example details how to use and what result you get.
CODE
<?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:table><xp:tr> <xp:td> <xp:label value="Field 1 (@DbName as a string) " id="label1"> </xp:label> </xp:td><xp:td> <xp:text escape="true" id="computedField1" value="#{javascript:return @DbName();}"> </xp:text> </xp:td> </xp:tr><xp:tr> <xp:td> <xp:label value="Field 2 (@DbName used as list)" id="label2"> </xp:label> </xp:td><xp:td> <xp:text escape="true" id="computedField2"> <xp:this.value><![CDATA[#{javascript:var database = @Subset(@DbName(), -1); var server = @Name("[CN]", @Subset(@DbName(), 1)); return database + " on " + server }]]></xp:this.value> </xp:text> </xp:td></xp:tr> </xp:table> </xp:view>
OUTPUT
Field 1 (@DbName as a string) CN=testserver/O=testorg,subdir\Test.nsf Field 2 (@DbName used as list) subdir\Test.nsf on testserver
If you did not get these results, update your question with a sample code.
Another thing to check is to translate "\" as an escape character into your code.
source share