How do I use getValueList in PHP?
I am having difficulty getting value lists to display on my website using the getValueList function. I have followed the formats I found in various forums and blogs. I can get the arrays that are intermediates in the calculation to prints but I cannot get the final results. I have tried two different methods listed below neither giving success.
I have also tried to get value lists generated from field summaries and from customized lists. Neither works. What am I missing? The code follows below. I read in a forum that the get getValueList broke in Filemaker 10 and was replaced by getValueListTwoFields. I tried this and it was no better. I am currently using Filemaker 11. Thanks.
Method looking up a stored list.
$cgi = new CGI();
$databaseName = 'Species';
$layoutName = 'web';
$fm = & new FileMaker();
$layoutObject = $fm->getLayout($layoutName);
$valueList = $layoutObject->getValueList('Genus');
The other approach uses
$fieldObject = $layoutObject -> getField('Genus');
$valueList = $fieldObject -> getValueList();
In the HTML section I then run
echo 'message'; ?>
Only 'message' is loaded on the screen when the page loads.