pub.document.sortDocuments not working

Hi,
I am stuck, I had this working last week now I have changed something and it will not work!

I have a simple flow service as follows:

pub.file.getFile
pub.flatFile.convertToValues
pub.document.sortDocuments

But the sortDocuments stage is not doing anything.
The recordWithNoID document list is perfect and all the fields are correct (so the schema and dictionary are working as intended), but when I try to sort it on the key “Field1” the sort is not doing anything, the documents are not changing order at all.

See two attached screenshots:
Screenshot 1 shows the pipeline during pub.document.sortDocuments step
key variable is: Field1
order variable is:ascending

Screenshot 2 shows the recordwithNoID after running the flow service. As you can see the Field1 column has not been ordered correctly.(it’s still in the original document order) I have also tried mapping the results to other document types with the same result.

As I said above I had this working last week and now cannot seem to get it to work. I have even started the whole process from scratch and it still will not work. Any help would be very much appreciated!


Answer for reference:

You have to use the document type created by the schema, which you can then map the recordWithNoID to the document list in the pipeline.