Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Stacey Levine
279
Views
2
Comments
How to export a complex structure to XML
Question
XML
Hello,
I am trying to figure out a way to turn a complex structure to XML to download. I can of course easily expose this as a soap service and return XML that way, but in this instance I need an actual file. In the attached OML, I have sample data that loads automatically. I should say that I tried serveral components - and in this last version i was trying the RecordToXML. To see where my issue is, on the home page which is a list of orders, the last column has a download icon connected to the action to try to download the file. Thanks for your help.
XMLDownload.oml
Gonçalo Borrêga
Hi Stacey,
Your variable must be of a Record type, not of the Structure type (the XmlRecords does not support those new types yet).
So, in your example what you need to do is change the FullOrderData variable to become a Record of REST_FullOrderInformation (instead of the direct REST_FullOrderInformation type).
Change from
to
Note that you have the same issue with lists. So in your example you'll also need to change the OrderDetails attribute of the REST_FullOrderInformation from being a "List of REST_OrderDetail" to be a "List of Record of REST_OrderDetail"
The attached example is working properly already with these changes
XMLDownload.oml
Gonçalo Borrêga
Stacey,
The latest version of Xml Records should be able to work using directly the structure/list types. So you might want to try reverting back to your base version, and try it with the new Xml Records version.
Kudos to João Rosado for that improvement :)
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...