Specifies whether the agent property can hold one or multiple values.
Type
public java.lang.String cardinality
Notes
The cardinality member variable determines whether an agent property's value consists of one value or multiple values. Therefore, it determines how many values the user can specify for the property.
Cardinality | Number of agent-property values the user can specify | Value of cardinality member variable |
---|---|---|
Single | One |
ODKConstant.SINGLE_CARD |
Multiple | Many |
ODKConstant.MULTIPLE_CARD |
The property's cardinality has an effect on the type of control that Business Object Wizard displays for the property. For more information, see Choosing the type of display control.
To initialize an agent property's cardinality, the following call to the third form of the AgentProperty() constructor specifies a string description value as the sixth argument:
AgentProperty agt = new AgentProperty("Username", AgentProperty.TYPE_STRING, "User Id for logging into the database", true, false, ODKConstant.SINGLE_CARD, null, null);