Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Custom Value Lists Returning Empty Array

Featured Replies

  • 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.

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...

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.