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.

Sort records with ValueLists?

Featured Replies

Hi, I'd like to sort records using value lists as well as text fields.  My FirstName field works (try Steve) but I'm at a loss on how to make the valuelist sort records correctly.  I want to search records from CA in my State valuelist.  Here's a link and the php code.  Thanks All!

http://ssvtennis.com/valuelistsort.php

valuelistsort.php

    $State = $_GET['LastName'];// ? shouldn't this be $State = $_GET("State") ?

 

The value list is being retrieved and displayed correctly; you just haven't called for the selected value in your find criteria.

 

  • Author

Thanks Doughemi, I'm still not getting a result when I pick a state in my valuelist.  The query is shown in the URL, but is not displaying records on my page.  Ultimately, I'd like several different value lists and text boxes returning results on same page.  here is an updated version of my valuelistsort.php.  Thanks!

valuelistsort-new.php

You have to add troubleshooting aids to your code, at least temporarily.  You can comment them out when you go live, but all I can tell now is that the search isn't being executed. Add some code to find out why:

    $FirstName = $_GET['FirstName'];
	$LastName = $_GET['LastName'];
	$State = $_GET['State'];
    echo 'Troubleshoot:<br>' $FirstName . ' ' . $LastName . ' ' . $State;// <-- Did the variables get set?
//  <snip> ... 
$result = $request->execute();
 if(FileMaker->isError($result){//  <-- is there a problem with the request?
        echo 'Error: ' . $result->getCode() . ': ' . $result->getMessage() . '<br>';
 }

 

Edited by doughemi

  • Author

Thanks doughemi, still having problem doing a sort from a value list.  Here is the URL to my example and my php page.  I don't think I'm sending the 'district' variable properly from the form.  http://ssvtennis.com/newvaluelist.php

newvaluelist.php

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.