In my past datacap projects the requirement was to arrange the several page types in a batch in a specific order. Because it was not possible to have the right order before scanning or importing them into the batch. As datacap have no option to do this you need to create a custom action that does the work. In the following I will show you how to easy it is to deploy this action and use it in your environment.

My action was made with VBScript so you simply need to open a text editor e.g. notepad++ and paste the following sample code in it.

<?xml version='1.0' ?>
<rrx namespace="SortPages" v="8.0.0"><i ref="rrunner.rrx"/><g>
<![CDATA[
'*********************************
'TIMETOACT group (C) 2019
' Version
'  1.0.0 - 02.09.2019 - Benjamin Just
'
'*********************************
]]></g>

<f name="SortPages" access="public" qi="Uses the OrderString to sort all pages in the required order">
<p name="OrderString"/>
<ap>
Komma separierte Liste der Sortierreihenfolge der Seiten<br/>
</ap>
<h>
z.B: Bestellung,Frontansicht,Grundriss,Perspektive<br/>
<e>
SortPages("Bestellung,Frontansicht,Grundriss,Perspektive"<br/>
</e>
Copyright (c) 2019 by Benjamin Just - TIMETOACT
</h>
<lvl>
Batch level
</lvl>
<ret>
<br/>
<b>True</b>
</ret>
<see>
<br/>
<scr></scr>
</see>
<g>
<![CDATA[
'Your VBScript code goes here.

Dim FieldAr
Dim FieldIndex
Dim i
dim j
dim l
FieldAr = Split(OrderString,",")

Dim Pagecount

Pagecount = CurrentObj.NumOfChildren
Pagecount = Pagecount - 1

Writelog("Pagecount " & Pagecount)
For j = 0 to uBound(FieldAr) step 1
	Writelog("Fieldart: "  & FieldAr(j))
	
	For i = 0 to Pagecount step 1 
	Writelog("DokArt: " & CurrentObj.GetChild(i).Type)
	If CurrentObj.GetChild(i).Type = FieldAr(j) Then
				
				Writelog("Move: " & CurrentObj.GetChild(i).Type)
				Call CurrentObj.MoveChild(i ,l)
				l = l+1
			End if
	next

next
]]>
</g>
</f>
</rrx>

Save this action as <YOURFILENAME>.rrx and copy it into you applications rules directory.

Now you can access this action in DC Studio in the “Application specific actions”

The Orderstring parameter of the action defines the sort order of the page types. E.g. if you have the page types Invoice, Order, Contract the action will sort all pages of the same type in this order.

The rule must run on batch level

64 thoughts on “Rearrange pages in datacap batch

  1. I do not even know how I ended up here, but I thought thispost was great. I don’t know who you are butdefinitely you’re going to a famous blogger if you are not already Cheers!

  2. Amazing things here. I’m very glad to see your post.Thanks so much and I am having a look forward to contact you.Will you please drop me a e-mail?Also visit my blog – natural yeast infection treatment

  3. ฝๅกถouไวทันใจใน 1 นาทีดารา และ เน็ตไอดอล เล่นกันเยอะได้เงินจริง ไม่โกง‼️

  4. Select a coupon template for virtually any gift or situation, customise it in Crello Editor,then electronic mail it or obtain and print.Free Coupons – Get Free Coupon Online – Store Shipping Couponfree coupons

  5. Hey there are using WordPress for your blog platform? I’m new to the blog world but I’m trying to get started and set up my own. Do you require any html coding expertise to make your own blog? Any help would be really appreciated!

  6. whoah this blog is magnificent i love readingyour articles. Keep up the good work! You understand, lots of people arehunting round for this info, you can help them greatly.My blog: eating plan

  7. Sweet blog! I found it while surfing around on Yahoo News.Do you have any suggestions on how to get listed libido enhancement in men Yahoo News?I’ve been trying for a while but I never seem to get there!Cheers

  8. Why viewers still make use of to read news papers when in this technological globe everything isavailable on net?

Leave a Reply

Your email address will not be published. Required fields are marked *