Xpages @Author showing 2 Authors -
i using following ssjs:
var author = @author().tostring(); var str = author.replace("cn=",""); var str2 = str.replace("o=",""); var str3 = str2.replace("[",""); var str4 = str3.replace("]",""); if("" == str4) return @name("[cn]",session.geteffectiveusername()); else return var4; not perfect way it, but...
question: why users edited document in field? want show author of document.
you list of users because that's @author() returns. here description of function taken online help: "returns names of authors of current document."
you can use @subset() latest author:
@subset(@author(), -1) and original author:
@subset(@author(), 1) use @name() format name. show common name part of original author, this:
@name("[cn]",@subset(@author(), 1))
Comments
Post a Comment