Input filed Slicing

I am working on a project where I scan Barcode, and save it into a thing. however the barcode value represents multiple things, how can I slice the value from the bar code and store it in different data fields.
For example the barcode value will be POP-X002WOLAXJ, I need to save Character 7-10 only to a data field in the data type

The following will turn POP-X002WOLAXJ into 02W0:
Input Barcode’s value :truncated to 10 :truncated from end to 4
Here are the docs.