Extracts the first L characters from the start of string IN and writes the result to the target STRING variable.
LEFT returns the leftmost length (L) characters of src (IN). Use it to extract station prefixes, header codes, or barcode prefixes.
STRING variable, source string (IN), and character count (L).from automation_machine import ActionQualifier, ActionInstruction
step.add_action("prefix_code", "Extract 3-char prefix", qualifier=ActionQualifier.P, instruction=ActionInstruction.LEFT, src="barcode", length="3")
STRING variableActionQualifier.P (Pulse)ActionInstruction.LEFTIN) — Source STRING variable or literalL) — Number of characters to extract (INT variable or literal)