Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Running a script from XML - what is the proper syntax

Featured Replies

Hello, I am now trying to run a FMS script using XML. I've never done that and I am totally new to this type of operation.

 

The script I've created is very simple it only write a new record onto a table using the layout fmsProduit.

 

The purpose of this script is not to change anything but to only write new records. 

 

Here is the syntax. I've copied the line down below in Safari and nothing happened.

 

http://10.0.1.99/fmi/xml/fmresultset.xml?-db=ViI (03.1)&-lay=fmsProduit&-findall&-script= testXMLcall

 

 

Could someone help me with this? This is greatly appreciated.

 

Daniel

fmsXMLINFO.pdf

testXMLcall.pdf

To save time on the query, use the -findany instead of -findall, since you are not interested in the returned data anyway.

 

This is straight from the FM CWP with XML tech brief.

Make sure that your script goes to the proper layout, don't rely on the XML query to do it.  Also make absolutely sure that your script contains only web-compatible script steps.


http://192.168.123.101/fmi/xml/fmresultset.xml?-db=employees&-lay=departments&-script=myscript&-findall 

What error is returned when you run your query?

  • Author

Thanks Wim for helping me.

The whole solution will be intranet, i.e not accessible to other but only dedicated people.

I've printed the FM CWP with XML and I am looking at examples on page 34.

However, there are things I am not sure.

For the http address I use the one I see when I Open remotely the database in FileMaker Pro under the network file path i.e 10.0.1.50

The database located on FileMaker Server is called : GDVDCS

Make sure that your script goes to the proper layout, don't rely on the XML query to do it. The layout I am using is called fmsProduit (I cut and paste the name from Manage Layout)
Also make absolutely sure that your script contains only web-compatible script steps. Under show compatibility I've chosen "Custom Web Publishing". Nothing is greyed out.

Go to Layout ["fmsProduit...
New Record/Request
Set Field [...

I ran the script from Manage script and everything works fine.

What error is returned when you run your query? No error are being returned, the script does not seem to execute.

http://10.0.1.50/fmi/xml/fmresultset.xml?-db=GDVDCS&-lay=fmsProduit&-script=testXMLcall&-findany "



Daniel

fmsURL.tiff

Thanks Wim for helping me.

The whole solution will be intranet, i.e not accessible to other but only dedicated people.

 

 

That doesn't make any difference

For the http address I use the one I see when I Open remotely the database in FileMaker Pro under the network file path i.e 10.0.1.50

The database located on FileMaker Server is called : GDVDCS

 

You have to know the IP address or DNS name of the server, and know the name of the database, looks like you have both of those covered in your url

Of course, at least one account in the file needs to have the fmxml extended privilege bit enabled

What error is returned when you run your query? No error are being returned, the script does not seem to execute.

 

 

When you run this in a browser as your screenshot seems to indicate, you will always see a return result.  FMS always returns an XML result with either the records you asked for or some error message.  But there is ALWAYS a result.  And that one will tell you what is wrong.

The FMserver_sample file that comes with FMS is set up for all proper access, including XML, so I would test against that one first to make sure you have the syntax right.  If that works then you will know that something else is off

  • Author

You wrote "of course, at least one account in the file needs to have the fmxml extended privilege bit enabled." This was my problem. The tip you gave me is by writing "privilege bit enable".

At this moment, each time I submit the URL it ask me to enter a user name and a password. I will look in the documentation how I could pass this information along with the URL.

Great, this is working.

Many thanks, with regards!

Daniel

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.