Jump to content

XML Query syntax - I'm getting something wrong


brianlees

This topic is 3759 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I'm attempting to setup my first XML query into our FMP Server (12).  I have a layout that has a script associated with it to execute on layout enter.  The only thing the script does is set to browse, go to the layout, execute a find (all records with a certain date).

 

But, I can't get the sytanx of the query correct.  I always get errors, mostly 4.  So, I tested just loading a small table and that query is fine.  Here is that query:

http://filemaker/fmi/xml/fmresultset.xml?-db=Fill%20Rate&-lay=KPI3&-findall

Here is the query of the one that doesn't work (the layout with the query associated with it)

http://filemaker/fmi/xml/fmresultset.xml?-db=Fill%20Rate&-lay=KPI2&-script=GB2

So, after reading (and reading, and reading) the Custom Web Publishing with XML document, I'm still at a loss.

 

Any help would be appreciated!

 

Brian


Wait….  So, I added &-findall to the end and that seemed to work.  So, now I'm confused.  Do I always need to add that?

Link to comment
Share on other sites

What you are missing is that you always have to ask for something back when you want to run a script.  That's whay the &-findall makes it work.

Running a script is an "additional" operator.

 

To make your query more responsive, use &-findany instead.  This will return just one random record instead of all the records in the table.

Link to comment
Share on other sites

This topic is 3759 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.