ARSperl Manual - ars_GetField

## `ars_GetField(ctrl, schema, id)`

Returns the Field Properties Structure.

`id` is the numerical Field Id.

See also `ars_GetListField`, `ars_GetFieldByName`, and `ars_GetFieldTable`

On success
  returns a reference to HASH
On failure
  returns undef

Example:

             ($field = ars_GetField($c, "User", 8)) || die $ars_errstr;
             print $field->{"helpText"};

Example of how to retrieve enumerated field labels (e.g. the Status (core field 7) field labels):

            ($field_info = ars_GetField($c, $s, 7})) ||
                die "GetField: $ars_errstr (no Status field in this schema?)";

            if( exists $field_info->{limit}{enumLimits}{regularList} ){
                @enum_vals = @{$field_info->{limit}{enumLimits}{regularList}};
            }else{
                @enum_vals = @{$field_info->{limit}{enumLimits}{customList}};
            }

            print "Status values: ".join(', ', @enum_vals)."\n";

Table of Contents