제공된 필드의 선택사항 목록 유형을 리턴합니다.
리턴값은 ChoiceType 상수(CLOSED_CHOICE 또는 OPEN_CHOICE)입니다. 리턴값이 CLOSED_CHOICE이면, 필드에 올바른 값이 선택사항 목록에 지정된 값으로 제한됨을 의미합니다. 리턴값이 OPEN_CHOICE이면, 선택사항 목록에서 항목을 선택할 수도 있고 새 값을 입력할 수도 있습니다.
VBScript
entity.GetFieldChoiceType field_name
Perl
$entity->GetFieldChoiceType(field_name);
VBScript
' If the field must have a value from a closed choice list, assign
' the first value in the list to the field by default.
choiceType = GetFieldChoiceType("field1")
If choiceType = AD_CLOSED_CHOICE Then
' Set the field to the first item in the choice list.
fieldChoiceList = GetFieldChoiceList("field1")
SetFieldValue "field1", fieldChoiceList(0)
End If
Perl
# If the field must have a value from a closed choice list, assign
# the first value in the list to the field by default.
$choicetype = $entity->GetFieldChoiceType("field1");
if ($choicetype eq $CQPerlExt::CQ_CLOSED_CHOICE)
{
# Set the field to the first item in the choice list.
$fieldchoicelist = $entity->GetFieldChoiceList("field1");
$entity->SetFieldValue("field1",@$fieldchoicelist[0]);
}