This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Aug 10, 2013, 1:16 PM
16 Posts

Authors Field

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.3
  • Role: Administrator,Developer
  • Tags:
  • Replies: 5

Hi,

I have an issue.  I am using the dojo name picker on and Xpage to populate and Authors Field.  This is working however the names are abbreviated.  If there a way via the java.util.Vector to itterate the values and convert them to cannonical? I am told that Abbreviated names do not work for an Authors field.  

Thanks in advance for any assistance

Steve

Aug 10, 2013, 3:25 PM
54 Posts
converter

Use a custom converter for that field to get the canonicalized value

Aug 10, 2013, 4:32 PM
16 Posts
Authors Field

Will that on save update the backend document to that also?  I have created but not tested the below code to attempt this also

 

/*
var nameslist = sendto.iterator()
while (nameslist.hasNext()) {
var longname:NotesName = session.createName(nameslist.next())
var Canonname = longname.getCanonical()
}
document1.replaceItemValue("resp",Canonname)
document1.save()
 
*/
Aug 10, 2013, 4:55 PM
54 Posts
coverter

A custom converter is a property of a field.

This is an example for a field which stores the names.

<xp:inputText id="FieldID" style="width:355.0px"
        value="#{document1.Field1}">
        <xp:this.converter>
            <xp:customConverter>
                <xp:this.getAsObject><![CDATA[#{javascript:@Name("[Canonicalize]",value)}]]></xp:this.getAsObject>
                <xp:this.getAsString><![CDATA[#{javascript:@Implode(@Name("[Abbreviate]",value))}]]></xp:this.getAsString>
            </xp:customConverter>
        </xp:this.converter>
    </xp:inputText>

Aug 10, 2013, 6:48 PM
16 Posts
Authors Field

Perfect.  This worked.  I was way over thinking this :)

Aug 11, 2013, 10:53 AM
586 Posts
Abbreviated Names

Abbreviated names should work fine for Authors fields.  I've used them for YEARS on Readers fields.  Just something like "David Leedy".  However that assumes a very flat organization, no duplicates etc.  So it is better to use the full CN name.  But abbreviated will work.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal