Pull first 8 characters

I'm receiving 11 digits through EDI. I only need the first 8. When I try to use a handlebar, I get the following error.

This is what the data looks like

5301043caa20740200000001-7a6ae8d05bf64c3db21211004f376999.png

What am I missing here?

There probably is a more efficient way to coerce a number to a string, but I use the โ€œjoinโ€ helper to concatenate the field with an empty string:

{{substring (join '' record.Lines.0.lot) 0 8}}

I emailed it to you as well as a test file. The Export that I'm troubleshooting this on is KLE - 943 and if it works there then I'll do it on KLE943 (sorry about the similar names ๐Ÿ˜…).

Also, this is in the transformation of the export. If I can't figure it out with handlebars, then I'll just program the transformation, but that's a lot of work around that I'd prefer not to have to do to remove 3 characters.

If the error persists, is it possible there is a Transformation step after the Export, before the import in your flow? I wonder if the value for "lot" is set to something other than String.

@jackharris I'm not able to reproduce this and what you sent works fine for my test. If you could email me the flow zip, that would help see if there is a bug that needs to be reported.

@jackharris it looks like there are a couple of issues.

  1. You have {{substring record.Lines.0.lot 0 8}}, but the lot field is Lot in the data. When I used {{substring record.Lines.0.Lot 0 8}} it worked in preview.
  2. After having it work in AFE preview, it isn't actually working in the entire transform preview and this is due to a bug in what you're seeing in AFE editor on step 1. To fix this, just use {{substring record.Lines.Lot 0 8}}. It will now work for the entire transform preview, but not the AFE editor preview. We will get a bug logged for this.