Sorting the XML output in the RTF itself

johndanter

Legendary Poster
Hi folks,

I have a custom Pick slip UBe R5542520 and I've been asked to add Country from F4006 to the output.

I've also been asked if it's possible to sort the output by country.

Now I've tried to do this in the UBE, no joy as F4006 isn't a part of the driver UBE. So I am hoping I can place a sort in the RTF itself....?

My main for each seems to be greyed out and contains the following text:
<[email protected]:pick_Slips_Detail_Lines_S3;./DETAIL_Pick_Slip_Number_ID225?><?sort:current-group()/DETAIL_Pick_Slip_Number_ID225;'ascending';data-type='number'?>

Now is there anyway I can add this field to the data sequencing <?Country_CTR_ID125?>

Also, does anyone know how to add a white on blank bar code to a document? Reverse of the normal barcode

Thanks

John
 

ybuffetaud

Active Member
Hi did you tried this :
<[email protected]:pick_Slips_Detail_Lines_S3;./DETAIL_Pick_Slip_Number_ID225?><?sort:current-group()/DETAIL_Pick_Slip_Number_ID225;'ascending';data-type='number'?><?sort:current-group()/Country_CTR_ID125;'ascending';data-type='text'?>

Is your country part of this section?
Regards
 

johndanter

Legendary Poster
Hi thanks,
It doesn't seem to work no

Maybe it's because Country_CTR_ID125 is part of a nested section Header_Custom_Section_S1.
see below

- <Pick_Slips_Detail_Lines_S3>
- <Header_Custom_Section_S15>
<Country_CTR_ID125>AU</Country_CTR_ID125>

Even if I change the order of the sort (to put CTR first) it still comes out as Pick Slip #. This is how the XML was created
 
Last edited:

ybuffetaud

Active Member
Recently I've worked on a copy of R42565 with some new fields on this. I have to made 3 templates depending on parameters above those fields.
I've done it like that :
After my header :
<?start:body?>
<[email protected]: On_Payment_Terms_S3?>
<?for-each-group:Detail_Line_1_Section_S2;./ AN8_ID312?>
<?if: xdoxslt:get_variable($_XDOCTX, 'AN8_URAB')=0?><?call: CAS3?><?end if?>
<?end for-each-group?>
<?for-each-group:Detail_Line_1_Section_S2;./ SHAN_ID231?>
<?xdoxslt:set_variable($_XDOCTX, 'DATES', '')?>
<?if:xdoxslt:get_variable($_XDOCTX, 'AN8_URAB')=1 and xdoxslt:get_variable($_XDOCTX, 'AN8_URAT')=1?><?call: CAS1?><?end if?>
<?if:xdoxslt:get_variable($_XDOCTX, 'AN8_URAB')=1 and xdoxslt:get_variable($_XDOCTX, 'AN8_URAT')=0?><?call: CAS2?><?end if?>
<?end for-each-group?>

Each Template (CAS1, CAS2,CAS3) is an array, here is the exemple of CAS2 :
<?for-each-group:current-group();./LND2_Unknown_Item_Format_wf__ID95?><?for-each-group:current-group();./Pricing_Unit_Of_Measure_ID56?> <?sort:current-group()/Pricing_Unit_Of_Measure_ID56;'ascending';data-type='text'?>LND2_Unknown_Item_Format_wf__ID95
 
Top