randyinla Posted October 16, 2015 Posted October 16, 2015 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
doughemi Posted October 16, 2015 Posted October 16, 2015 $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.
randyinla Posted October 17, 2015 Author Posted October 17, 2015 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
doughemi Posted October 20, 2015 Posted October 20, 2015 (edited) 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, 2015 by doughemi
randyinla Posted October 21, 2015 Author Posted October 21, 2015 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
Recommended Posts
This topic is 3614 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 accountSign in
Already have an account? Sign in here.
Sign In Now