Record Count through Datamapper

Hello,

I’m hoping to extract the total number of records in the address portion of a complex file to use in loops, etc. within Datamapper. I don’t need the number of ‘details’, just the address/header of the record. Is this number available to assign to variables? It seems that Datamapper calculates or knows the number of records, because when you are designing Data Models, the record [##] is always available and showing in the top of the model.

The fact that the DM (i.e. DataMapper) displays the number of records is simply because it processes the entire file before showing the value on screen. So to do the same thing, you’d have to go through the entire file as well.

There’s a REST call you can use from Workflow that validates a DM process and that also allows you to determine how many records are in that job, without actually performing the DM operation. You could use that REST call to store the number of records in a JobInfo, which will automatically gets passed to the DM when you actually perform the DM Operation, so you will know ahead of time how many records are in the job.

Setting up your Workflow process to make REST calls is non-trivial for first time users, so if you fit that description, I suggest you call our Professional Services crew to help you with that project. But if you aren’t in a big hurry, you can also wait for version 2018.2 of Connect, due out next week, which natively allows you, through a simple checkbox in the DM Task, to pre-validate a DM job and store the number of records in the metadata, which you can extract and pass on to the actual DM process through a JobInfo.