/** * Returns the two field value list associated with the given field in Record's layout. * * @param string $fieldName Field's Name * @return array|\airmoi\FileMaker\FileMakerException * @see Layout::getValueListTwoFields */ public function getFieldValueListTwoFields($fieldName) { if (!is_null($this->parent) && !strpos($fieldName, '::')) { $fieldName = $this->relatedSetName . '::' . $fieldName; } if (!isset($this->fields[$fieldName])) { $this->fm->log('Field "' . $fieldName . '" not found.', FileMaker::LOG_INFO); return []; } //Force load extendedInfos as Field's valueList property is not set until extended infos are retrieved $ExtendedInfos = $this->layout->loadExtendedInfo($this->recordId); if (FileMaker::isError($ExtendedInfos)) { return $ExtendedInfos; } $field = $this->layout->getField($fieldName); if (FileMaker::isError($field)) { return []; } //Get the value list if field has one if ($field->valueList !== null) { return $this->layout->getValueListTwoFields($this->layout->fields[$fieldName]->valueList, $this->recordId); } return []; }