X12 Decode | DECODE_X12
Syntax
DECODE_X12( [value] )
Parameters
value
An X12 encoded TEXT value to decode.
If it is not a TEXT value, it will be converted to one with the STRING operation.
Return Value
An ARRAY value formatted as a segment document.Description
Decode a TEXT value as an X12 document. For more information on the X12 format, please visit https://www.edi-plus.com/resources/message-formats/ansi-x12/.Examples
DECODE_X12("~ST*0*0001~SE*0*0001~")
# returns [ [ ST => [ [ "0", "0001" ] ], SE => [ [ "0", "0001" ] ] ] ]
# ST*1 can be accessed in InstaLink with VALUE.ST[].0
# ST*2 can be accessed in InstaLink with VALUE.ST[].1