Examples: ListSep property (ViewColumn - Java)

This agent toggles the list separator for a column.

import lotus.domino.*;

public class JavaAgent extends AgentBase {

  public void NotesMain() {

    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();

      // (Your code goes here) 
      Database db = agentContext.getCurrentDatabase();
      View view = db.getView("All Documents");
      ViewColumn vc = view.getColumn(7);
      String listString = null;
      if (vc.getListSep() == ViewColumn.SEP_COMMA) {
        vc.setListSep(ViewColumn.SEP_NEWLINE);
        listString = "Newline";
      }
      else if (vc.getListSep() == ViewColumn.SEP_NEWLINE) {
        vc.setListSep(ViewColumn.SEP_NONE);
        listString = "None";
      }
      else if (vc.getListSep() == ViewColumn.SEP_NONE) {
        vc.setListSep(ViewColumn.SEP_SEMICOLON);
        listString = "Semicolon";
      }
      else if (vc.getListSep() == ViewColumn.SEP_SEMICOLON) {
        vc.setListSep(ViewColumn.SEP_SPACE);
        listString = "Space";
      }
      else {
        vc.setListSep(ViewColumn.SEP_COMMA);
        listString = "Comma";
      }
      System.out.println("List separator = " + listString);
        
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}