Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

I've got a client with an FM solution that's been developed over the past 12+ years. As such, all of their "tables" (or at least the primary ones) are stored across separate FM files because that used to be how you had to do it. Now the solutions is so big it's too complex to try and migrate everything into a single file, much to my chagrin.

Anyway, I've got PayPal IPN working to automatically add orders into a MySQL database which I have connected in FM as an external sql source. Now I need to create an FM script to create an actual Invoice in their current system based off the IPN order data.

The problem, though, is that because of how everything is stored in separate files (customer data, order data, order items, etc.) I can't use global variables ($$varname) within FM scripts. The data won't pass from file to file.

The only way I think to make this work is to export out to a txt file (I'd like to use XML) and then import from within those other files where necessary. I've put together the following XML file to do a test with...

<?xml version="1.0" encoding="utf-8"?>



	

		123456

		eBay

		FedEx Ground

		Completed

		Eligible

		50.00

		10.00

		2.00

		

		62.00

		2.50

		This is a customer note.

	

	

		Tester Testerson

		Testers, LLC

		123 Test Ave.

		

		Grandview

		MO

		64030

		United States

		555-555-5555

		[email protected]

	

	

		Tester Testerson

		

		123 Test Ave.

		

		Grandview

		MO

		64030

		United States

		555-555-5555

		[email protected]

	

	

		

		

		

	

	

		

			Test Widget 1

			123456

			Test Widget 1

			

			1

			25.00

		

		

			Test Widget 2

			654321

			Test Widget 2

			

			1

			25.00

		

	

When I try and import that I'm getting an error: Unknown Element 'Price'.

What would cause that? Can I not use my own XML? Does it have to be fmxmlresult formatted or whatever..?? If so I'll probably go another route because when I export out of FileMaker as an XML I get that crazy format that isn't very human readable and it seems tough to work with. Maybe not..??

Anyway, what's the best way to do this? Anybody got a tip for me? Any information would be greatly appreciated. Thanks!

Posted

I am not sure why you cannot import directly from the external source, or use scripts (you can pass values between files through the script parameter, or by storing them in global fields).

In any case, Filemaker imports XML only in its own FMPXMLRESULT grammar. You can use a custom XSLT sylesheet to transform your own XML grammar into FMPXMLRESULT.

This topic is 5563 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.