Package com.veeva.vault.sdk.api.picklist
Interface PicklistValue
public interface PicklistValue
Provides access to picklist values, allowing retrieval of labels, status, name, and whether or not the value has
dependencies.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the names (public keys) of the controlling picklist values.getLabel()Retrieves a picklist value's label.getName()Retrieves a picklist value's name.intgetOrder()Retrieves the display order of the picklist value.booleanIndicates whether the picklist value is dependent on controlling values.booleanisActive()Determines if a picklist value is active or inactive.
-
Method Details
-
isActive
boolean isActive()Determines if a picklist value is active or inactive.Picklist values become inactive when a Vault Administrator removes them from the picklist. You cannot use inactive picklist values when updating or inserting a record.
- Returns:
- true if active, false if inactive
-
getLabel
String getLabel()Retrieves a picklist value's label. Depending on the method used to retrieve the picklist value, the label will be translated as follows:- If the picklist value was retrieved from a
PicklistValueMetadataCollectionResponse, the label defaulting behavior is dependent on the request. For more details, seePicklistValueMetadataCollectionRequest. - If the picklist value was retrieved from a
Picklist, the label may be in the Vault's base language or the user's language. Learn more about base language and user language in Vault Help. - If the
Picklistwas retrieved withPicklistService.getPicklist(String), this label is in the Vault's base language. If no label exists in the Vault's base language, returns the label in English. - If the
Picklistwas retrieved withPicklistService.getPicklist(PicklistRequest), the label defaulting behavior is dependent on the request. - If
PicklistRequesthas a label set, the label will return in the label set's language. - If
PicklistRequestdoes not have a label set, the label will return in the PicklistRequest language. - If
PicklistRequestdoes not have a language, the label will return in the user's language. - If no label exists in the request label set's language, or if the
PicklistRequestdid not have a label set and no label exists in the PicklistRequest's language, or if thePicklistRequestdid not have a label set or a language and no label exists in the user's language, returns the label in the Vault's base language. - If no label exists in the Vault's base language either, returns the label in English.
- Returns:
- the picklist value label.
- If the picklist value was retrieved from a
-
getName
String getName()Retrieves a picklist value's name.- Returns:
- the picklist value name
-
getOrder
int getOrder()Retrieves the display order of the picklist value.- Returns:
- the picklist value order
-
hasControllingValues
boolean hasControllingValues()Indicates whether the picklist value is dependent on controlling values.- Returns:
- true if the picklist value has controlling values, otherwise false
-
getControllingValueNames
Returns the names (public keys) of the controlling picklist values. Returns an empty list if no controlling values exist.- Returns:
- names of the controlling picklist values
-