Get record count before Create Job

We have a job that occasionally does not generate a single record (all are skipped in datamapper). If we run Create Job we get an error “There are no content items to process”.
How can we check the number of generated records before Create Job task?

Thanks,
Darko

Hello Darko,

After either the Execute Data Mapping task or Create Print Content task, you can use the Metadata Attribute Number of documents in Job (GetMeta(SelectedDocumentCount[0], 11, Job)) to check the record count.

Source: Calculate Multi Pages Records

Examples

Set Job infos and Variables task

Var/Info# Value
%9 GetMeta(SelectedDocumentCount[0], 11, Job)

Run Script task (Language: JScript)

var recordCount = Watch.ExpandString("GetMeta(SelectedDocumentCount[0], 11, Job)");

OR

var metadata = new ActiveXObject("MetadataLib.MetaFile");

metadata.LoadFromFile(Watch.GetMetadataFileName());

var recordCount = metadata.Job().SelectedDocumentCount();

edit: My mistake. I skipped the data extraction step but forgot to add actionscript to skip to the next record