October 16, 201510 yr 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
October 16, 201510 yr $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.
October 17, 201510 yr 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
October 20, 201510 yr 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 October 20, 201510 yr by doughemi
October 21, 201510 yr 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