Examples: IsFormula property

This agent displays the view columns based on formulas.

import lotus.domino.*;
import java.util.Vector;

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");
      Vector vcs = view.getColumns();
      for (int i=0; i<vcs.size(); i++) {
        ViewColumn vc = (ViewColumn)vcs.elementAt(i);
        if (vc.isFormula()) {
          String title = vc.getTitle();
          if (title.length() == 0) title = "<No title>";
          System.out.println(vc.getPosition() + " " +
          title + ": " + vc.getFormula());
        }
      }
        
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}