Skip to main content Skip to complementary content

The GetElementProperty function

The GetElementProperty can only be used in the Util tab expression, not in the Value tab expression.

The properties, element name and level number, are quite easy to understand and do not pose particular difficulties. The byte offset property is less evident and needs at least one concrete example.

Example: Using getElementProperty in a Flat structure

Consider the following Flat structure:

It contains three (3) fields - a, b, and c. Each field has an initiator that allows to detect when a field begins in the input data.

Consider the following sample input data:

See the three fields delimited by the initiators a, b, and c. The c field starts with string 000 that should be skipped. To get the desired result, use GetElementProperty combined with SetElementProperty.

Specify the following Util expression on the c field:

The GetElementProperty function gets the current byte offset of the c element, which is the absolute offset of the C character in the sample data. Since you want to skip the next three 0 characters, add three (3) to the returned offset and set the result to the byte offset property of the c element. Using this mechanism, you bypass the 000 string.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!