Condition - If XML contains ABC?
Posted: Thu Jan 25, 2024 2:09 pm
Hi, I need to sort PDF files dependent if there are other job-lines in the same order that contains a certain type-value (lets say ABC).
The number of job-lines can vary (Example XML below).
My take on solving this is to inject the XML as private data (see screenshot) and then use the condition: if [Job.PrivateData:Key="FileContent"] contains ABC. This way I can look for a specific value anywhere in the XML-order. But it's an awkward solution.
There is probably a much more simple way of doing this. Any suggestions?
The number of job-lines can vary (Example XML below).
My take on solving this is to inject the XML as private data (see screenshot) and then use the condition: if [Job.PrivateData:Key="FileContent"] contains ABC. This way I can look for a specific value anywhere in the XML-order. But it's an awkward solution.
There is probably a much more simple way of doing this. Any suggestions?
Code: Select all
<order>
<orderid>0001</orderid>
<jobs>
<job>
<file>A.pdf</file>
<type>123</type>
</job>
<job>
<file>B.pdf</file>
<type>ABC</type>
</job>
</jobs>
</order>