Hi
I’m writing a Java agent and I try to access the values from a checkbox where multiple values are allowed.
With
entry.getDocument().getIemValueString(“Iteration_Version”));
I get only the first value.
Would be nice if anyone could help me.
Hi
I’m writing a Java agent and I try to access the values from a checkbox where multiple values are allowed.
With
entry.getDocument().getIemValueString(“Iteration_Version”));
I get only the first value.
Would be nice if anyone could help me.
Subject: Access Checkbox Values with Java
// In the code below, fieldb should be replaced with your fieldname
import lotus.domino.*;
import java.util.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
DocumentCollection dc =
agentContext.getUnprocessedDocuments();
System.out.println("Count = " + dc.getCount());
Document doc = dc.getFirstDocument();
while (doc != null) {
Item item = doc.getFirstItem("fieldb");
Vector v = item.getValues();
Enumeration values = item.getValues().elements();
while (values.hasMoreElements()) {
System.out.println((String)values.nextElement());
}
doc = dc.getNextDocument();
}
} catch(Exception e) {
e.printStackTrace();
}
}
}