# Retrieve Layout of a Dynstruct > [HTML Version](retrieve_layout_dystruct.htm) Typically, to access the dynstruct effectively, you need to get the information about the fields organized in way to facilitate easy systematic access. The [MX\_DYNSTRUCT](mx_dynstruct.htm.md) DYNOP\_INFO call returns the layout information for a previously defined dynstruct. You can reference it by its name, or via a dynstruct variable which has been bound to the dynstruct definition. The layout is returned to you in an array of structures containing all the relevant attributes for each field. The array is of type [ST\_FLDDEF](st_flddef.htm.md). Note that since the subroutine is not able to auto-extend the array, either you must make two calls—the first to get the number of fields, the second to get the actual array after re-dimensioning it to the necessary size—or use the [fndynst.bsi](https://bitbucket.org/microsabio/soslib/src/master/907010/fndynst.bsi) wrapper function which takes care of those details. Here we get the layout of the previously defined ST\_TEST dynstruct, from the first example, and from that we’ll create a simple array of field names to be used later for accessing the members by name. map1 fields,i,4 map1 i,i,4 dimx flddefs(10),ST\_FLDDEF \! array of field definitions dimx fnames\$(0), T\_DYN\_NAME, auto\_extend \! array of field names fields = Fn'Dynst'Get'Def'By'Name("ST\_TEST",flddefs()) ? "fields: ";fields; ifelse\$(fields >= 0, " \[ok\]"," \[Error\]") if fields > 0 then for i = 1 to fields fnames\$(i) = flddefs(i).name next i endif It may seem pointless to copy the field names from the flddefs() array of ST\_FLDDEF structures into the simple array fnames\$(), but we need a simple array, i.e. an array of strings rather than structures for syntactic reasons when actually referencing the dynstruct members. See [Indirect Deferred Syntax Limitations](indirect_deferred_syntax.htm.md). Also note that while in most cases, all we need in order to access the structure members are the field names, if any of the structure members are arrays, we’ll need to get that information from the flddefs() array and use it to form alternate syntax for accessing the array members. The syntax for referencing an array variable is necessarily different from that for scalar variables.