Then goes to second print content and output. When I view the metadata it is indeed still ordered(descending even though it created a new contentitem but the record are still as expected) as intended but my resulting final pdf is not in order.
Why are you calling Create Print Content a second time after sorting the metadata? Your content was already created the first time around, the content items are in the database. You just sort them and then pass them on directly to the Job Creation task.
By running the Create Content items a second time, you are recreating the metadata, so your previous Metadata Sorter is now kind of irrelevant.
Just take out that second Create Print Content task and see what you get.
Create content first time by running Data Mapper → Create Print Content → (find records with specific sheet counts and create a lookup while saving the content item IDs somewhere for later retrieval, reports etc.) 10 content items generated.
Theres a lot of process that happened in between, now Im ready to use the content item ids I saved and by using Retrieve Item , now I only want 5 content items from the 10. Once those 5 has loaded , I now modify the metadata SortOrder field to the correct value. Now comes the metadata sort with that field in ascending order. Now comes the output.
This is the bit where Im confused or at least this is how I think its going to work.
I then try to just follow it up with Create Job - > Create Output : It errors out saying it needed a content Set ID. So I feed the content set ID as well using Metadata Field Management. It created my PDF but in the order it was originally from Step1. And it also returns the whole 10 records.
I then try to do the above but this time I add another Create Print Content, which given me the 5 records but still not the order I want. (Hence the post)
So from the example here that I sent you. Im just testing it out (this is not the actual process), to see how it all works. But my assumption seems incorrect again. As I thought when you have a metadata all sorted the way you wanted to, passing Print Content after it, will use that metadata and corresponding output would reflect the metadata before it.
Anyways I did contact someone about this and told me that I can do the ordering via Job Preset.
Which now works as intended basically,
Able to retrieve 5/10 content items(Retrieve Items)
update the SortOrder metadata field values (Run Script)
Update Data Records (For some reason I need this so that it works)
Create print content
Create Job - Sort by SortOrder field ascending
Create Output
Pdf - contains 5 record and in ascending order.
For reference I removed the 2nd Create Print Content and still get same output (not in the descending order)
I supposed I really need to understand what these “Content Items” really are.