fmwebschool.com
Top Experts [learn more]Top 4-10
webko

9743 K
bandmandq

2458 K
Genx

1525 K
4. tcmeyers
5. kbata
6. Martie
7. Hammerton
8. rrenfrow
9. bneeman
10. plegler
Welcome, Guest. Please login or register.
May 22, 2013, 10:28:55 PM

Login with username, password and session length
Search:     Advanced search
FMWebschool releases more educational FMStudio webinars - check them out here:
http://www.fmwebschool.com/webinars.php
27462 Posts in 6065 Topics by 1523 Members
Latest Member: donok
* Home Help Search Calendar Login Register
+  fmwebschool.com
|-+  PHP Web Publishing Technologies
| |-+  FileMaker PHP, FX.php custom web publishing
| | |-+  AddDatabaseParam()
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: AddDatabaseParam()  (Read 1487 times)
jrough
Jr. Member
**
Offline Offline

Posts: 46


« on: October 12, 2009, 11:47:29 AM »

I want to get the found set of a Filemaker find and I don't know how to set up the fx find query.   I don't think there is a function to find the current found set?
I have an address list selected by the user.  I want to plot that on google maps for which I need php but I don't know how to get the data into a php variable.
The global list is gathered in a FM script. 

$request = new FX($serverIP, $webCompanionPort, $dataSourceType, $dataURLType);
$request -> SetDBData($database,$layout);
$request ->SetDBPassword($webPW,$webUN);
$request-> AddDBParam('glist', $value);
$result = $fmQuery->FMFind();

The trouble is glist is a global field on the layout and I don't know what to put in $value.   The $value parameter is required but it is not defined until the user makes a company selection and runs the script which updates the list.   I just want to get the list from glist and then I can parse it in php.
There is  an fx.php way to set a Global.  Is there a way to get the value from a global?  I'm stumped on this.  I think selection data is usually entered through forms and  Filemaker is queried but in this case there is no form.  The selection is made in Filemaker and php is just passing on the data to google maps.  I would like to reroute it back to Fielmaker in the web viewer.  Isn't there an FX query for getting the current Filemaker found set?  am I missing it?
thanks,
Logged
webko
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2050
Kudos: 9743



WWW
Applications:
« Reply #1 on: October 12, 2009, 12:21:15 PM »

OK, here's the thing to remember - requests via the web are 'stateless' - FM does not and cannot remember what the last request was, as it may have come from another web user altogether. For the same reason, globals are almost unusable via the web - they will always get reset to their default value on each and every query.

So FX does not have a command for 'current found set' as there is never a current found set for each web query, the database is at default values.

You will have to work out how to simulate your script from a web perspective. I will say that have yet to find a FM function that I haven;t been able to recreate via the web though...
Logged

tim.webko_at_gmail.com
jrough
Jr. Member
**
Offline Offline

Posts: 46


« Reply #2 on: October 12, 2009, 02:04:44 PM »

you are right, bad news.
I just turned on IWP.  Is there a way I can post the selected records to  web server advanced in Filemaker?
I have IWP on my laptop.
I have server advanced running on my Mac desktop.  It has to be a post it can't be a get.
I think I have run into a roadblock for sure because the WEb Viewer can only do a Get.
I guess I was thinking applescript or something, would this be a case for cURL,
couldn't I use cURL from  FX.php to get the current state of a Filemaker found set?
Logged
webko
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2050
Kudos: 9743



WWW
Applications:
« Reply #3 on: October 12, 2009, 03:22:03 PM »

I think you should approach this from a different angle - IWP will probably not help either...

If I'm reading correctly, the user makes a company selection from a list.
FileMaker runs a script to get the matching addresses and creates a list of them.
A call to GoogleMaps is made with these addresses in order to make a plot of them.

Is this roughly correct?
Logged

tim.webko_at_gmail.com
jrough
Jr. Member
**
Offline Offline

Posts: 46


« Reply #4 on: October 13, 2009, 08:27:29 PM »

I agree.  Filemaker has its limits.  I could make a web form for the selection but the app has a desktop component and a web component so that defeats that.
It would only work on the web side.
I think IWP is working.  It appears to be working.   I have a php script that combines the list and sends it as a serialized GET string.  It has been a big pain.
I can do it as a GET but I want to do it as a post but that is another subject.  I'm using easygooglemap class and I need another phoogle class which appears to have errors in it.
The reason I tried FX.php is because I can do a query without it being a GET however i didn't think about the stateless problem  so I kind of got stuck both ways.
It has been a round about learning experience one which I probably shouldn't have gotten involved in.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!