[XML Records] RecordToXml issue

Forge Component
Published on 11 Jan by Afonso Carvalho
34 votes
Published on 11 Jan by Afonso Carvalho

I encountered an issue while using the RecordToXml Method. I noticed that It doesnt convert the second column that is a recordlist. It used to work fine before I updated to version 9 but now its not. Its just getting the name of the recordlis(its .net name) and placing it inside the node.

Has anyone actually encountered this scenario?


Are you sure you are using a Record List instead of the new Platform 9 List?
Hi Killian,

I'm using the recordlist not the platform 9 list.

I actually found the issue here. When the Recordlist inside the Record is only 1, it doesnt convert the records. I did a work around to make it work, I used the RecordtoXML if the recordlist has only one row.

Really? How odd. Well, good you found a workaround.

Can anyone tell me why the XmlToRecordList is not supporting RecordList Type (i's really Record List i'm not talking about the v9 List Type) inside a Record?

If i change the RecordList to Record it works just fine.

best regards
It doesn't support it because support for it isn't coded yet :). It would mean recursion and all that kind of nasty stuff.
Hi Kilian,

This was already supported by the XmlRecords extension, i used it with the OS v8.0 and it worked just fine having a record list as an attribute of a record. 

So, how can it be that it isn't coded yet, i suppose it's not coded for the new type List of the v9, right?

Yes, if it worked in 8 it should work with the same record(list) with 9.
hmmm, sorry for only noticing this thread now.

This might actually be a bug. @Hugo, do you have a simple module where you can reproduce the issue? I wouldn't mind taking a look at it and seeing what might be the issue.
Hi Ricardo,

I've continued the search and solved the issue, i was using a version of the extension that didn't support the changes on the v9 data types. However there is a version of the xml records extension that was modified with that intent, version 1.5.6.

thanks for the reply.

Kilian Hekhuis wrote:

Are you sure you are using a Record List instead of the new Platform 9 List?

Hi Kilian,

I was facing a similar issue while using the new Platform 9 List but it worked when I changed it to RecordList. Could you explain why?

Hi Sanchit,

With Platform version 9, OutSystems introduced a new List type (and new "bare" types), that doesn't use a Record (which is a container for Structures and Entity types). These new types are different from Record Lists and Records, and a bit more complex too at C# level, so they weren't supported out-of-the-box, and it took a while to get them supported (this also goes for many other Forge components - I think OS could've done a better job documenting the changes). If you check the Versions tab of XML Records, you'll see that the latest stable version has support for the new lists (available for version 9.1 and up).