Jump to content
Server Maintenance This Week. ×

Custom Value Lists Returning Empty Array


This topic is 3712 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello,

 

I am currently developing a PHP script to speak to a MySQL database and then insert information into FileMaker (11 Server Advanced).  However, I am having a lot of problems obtaining the values within a value list.  It is a custom value list.

 

For example, one of the values in the value list is "Assigned" but when I try to set the field to this it returns that I did not provide a value within the list.  I decided to try and obtain the custom value list in order to determine why it was not working but it simply returns an empty array with no keys or values.

 

Here is the snippet of code I am using to grab the values within a custom value list:

 

 

require_once('FileMaker.php');

$fm = new FileMaker('FileMaker.fp7', 'xxx.xxx.x.xxx', 'user', 'password') or die('Could not connect to FM.');

 

$layout = & $fm->getLayout('Orders');
$field = $layout->getField("Freebie");
$values = $layout->getValueList('Assignment Status');
        
print_r($values);

 

Also note that I understand getValueList() is deprecated but when trying to use "$values = $field->getValueListTwoFields("Assignment Status");" the FileMaker PHP API (which I retrieved from the FileMaker Server folder) keeps coming back that it is an undefined function.

 

This has been holding up my development for a couple days now and any assistance that anyone can provide would be greatly appreciated.

Link to comment
Share on other sites

And that value list is available on that layout?

 

The $field command is irrelevant, btw - the value list just has to be assigned to a field on the layout, doesn't matter which one...

Link to comment
Share on other sites

This topic is 3712 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.