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
ClausS
1
Views
2
Comments
XML Records how to export child records as attributes
Discussion
How-to
I've got entities company and employee. Obviously a company can have more than one employee.
I've got the employee entity linking to the company entity with a companyId.
When I use RecordToXml on the company entity I only get the company entity, not the employees.
I would like to have the employees listed as attributes within the xml for the company, such as:
<company>
<employee>James</employee>
<employee>John</employee>
</company>
How to do this in the easiest way?
ClausS
Here's an OML that demonstrates the requirement....
Company_Employees.oml
ClausS
I never got any help for this one and in fact many must have the problem. XML Records is not well documented and since it is such a helpful component it is really a pity.
In any case one way to do the above is:
- define structures with exactly the layout and attributes that you need in your XML
- then copy the relevant records into these structures
- the XML configuration parameters are best defined as an XML structure in itself, then converted into records with XmlToRecord
- the final XML output can be further modified with replace statements and by adding the surrounding XML tags
-- Claus
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...