daniel taylor Posted December 5, 2005 Posted December 5, 2005 Hello, I am having a problem with FX.php and getting the 'valuelists' array, it is not showing up I am pretty sure it's a bug in the fx class.. as everything is working perfect.. the code I am using is the standard routine like this: $InstanceName = new FX('127.0.0.1'); $InstanceName->SetDBData('CDList', 'web_view'); $ReturnedData = $InstanceName->FMView(); // stores layout information in $ReturnedData foreach ($ReturnedData['valueLists'] as $key => $value) { foreach ($value as $key1 => $value1) { $valuelistData[$key] .= "t$value1n"; } echo "n"; echo $valuelistData[$key]; echo "n"; echo " n"; } But it does not return anything, I all ready made sure there was a field using a value list, and also making it a list-menu etc.. but the class will not pass the info on to the array object.. I get a 0, has anybody jumped into this problem? I had no problem when it was FM6 and FX (2002..) but now I have FX 4.2 and FMSA 7v3 and it's not working.. does somebody know a work around? Thank you and will appreciate any help on this.. Best wishes DT
daniel taylor Posted December 5, 2005 Author Posted December 5, 2005 (edited) no, it's a local static list. I even tried the same thing using the sample book DB found at the FX.php folder and adding a valuelist and then adding it to the list view issued a print and got this: Array ( [data] => Array ( [1.13] => Array ( [author] => Array ( [0] => Gethrundt, Ivan ) [title] => Array ( [0] => The Collection of Empty Pages ) [number_of_pages] => Array ( [0] => 72 ) [testmenu] => Array ( [0] => Hello ) ) [2.10] => Array ( [author] => Array ( [0] => Hansen, Chris with Adams, Chris ) [title] => Array ( [0] => FX.php ) [number_of_pages] => Array ( [0] => 1 ) [testmenu] => Array ( [0] => ) ) [3.1] => Array ( [author] => Array ( [0] => ) [title] => Array ( [0] => The Artistic License ) [number_of_pages] => Array ( [0] => 1 ) [testmenu] => Array ( [0] => ) ) [4.0] => Array ( [author] => Array ( [0] => Adams, Chris ) [title] => Array ( [0] => PHP Caching Class ) [number_of_pages] => Array ( [0] => 1 ) [testmenu] => Array ( [0] => ) ) [5.1] => Array ( [author] => Array ( [0] => Converse, Tim and Park, Joyce ) [title] => Array ( [0] => PHP 4 Bible ) [number_of_pages] => Array ( [0] => ) [testmenu] => Array ( [0] => ) ) [6.0] => Array ( [author] => Array ( [0] => Bowers, Bob and Lane, Steve ) [title] => Array ( [0] => Advanced FileMaker Pro 6 Web Development ) [number_of_pages] => Array ( [0] => 438 ) [testmenu] => Array ( [0] => ) ) [7.2] => Array ( [author] => Array ( [0] => Hansen, Chris ) [title] => Array ( [0] => www.iViking.org ) [number_of_pages] => Array ( [0] => 10 ) [testmenu] => Array ( [0] => ) ) ) [linkNext] => [linkPrevious] => [foundCount] => 7 [fields] => Array ( [0] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => author [type] => TEXT [extra] => ) [1] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => title [type] => TEXT [extra] => ) [2] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => number_of_pages [type] => NUMBER [extra] => ) [3] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] => testmenu [type] => TEXT [extra] => ) ) => http://Admin:@192.168.1.30:80/fmi/xml/FMPXMLRESULT.xml?-db=Book_List.fp7&-lay=Book_List&-max=50&-findall [query] => [errorCode] => 0 [valueLists] => Array ( ) ) See that the last element " [valueLists] => Array ( ) )" does not have anything? .. it's very strange.. and if I delete all fields from the layout and just leave that one field with a menu, I will get an error like: fx_error Object ( [error_message_prefix] => [mode] => 1 [level] => 1024 [code] => 100 [message] => FX: ExecuteQuery XML error: mismatched tag at line 6 [userinfo] => [backtrace] => Array ( [0] => Array ( [file] => fmview [class] => fx [type] => -> [args] => Array ( ) ) ) [callback] => ) I am now having to create a work arround using global fields and scripts to set the field values on them and then use javscript to popuate menus on the web pages... (I think it will work but would REALLY like FX.php to work.. Edited December 5, 2005 by Guest
Garry Claridge Posted December 5, 2005 Posted December 5, 2005 Does an FMFindany() make a difference? Garry
mlindal Posted December 6, 2005 Posted December 6, 2005 Gary beat me to the answer. You need to use FMFindany() rather than FMView() To make valuelists show up. I had a similar problem.
daniel taylor Posted December 6, 2005 Author Posted December 6, 2005 Thanks everybody.. I changed it to -FMview() and it worked.. I was using -find, I know it's contrary to what you recommend but actually according to the documentation it says that it will work for -FMView(), but it did not said that it did exclusively.. that was the mistake. So, it seems you are getting it to work with findall()? that's interesting.. I somewhat assumed that the listvalues array got populated in any mode.. Thanks again.. DT
mlindal Posted December 7, 2005 Posted December 7, 2005 interesting. Glad to hear you got it working. I needed to use Findany() to make it work. Findall() may work but would be quite a bit slower.
Recommended Posts
This topic is 7025 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