ARSperl Programmer's Manual - ars_SetField

## `ars_SetField(ctrl, schema, fieldId, fieldHash)`

This function modifies an existing field. You must first populate the `fieldHash` before calling this routine.

`schema` is the name of the schema containing the field.

`fieldId` is numeric id of the field.

`fieldHash` is an Field Attributes hash.

On success
  Returns 1
On failure
  Returns 0

Example:

> This example increases the content length of a character field. It also specifies write permission for group 505 and read permission for group 506.

          ($fd = ars_GetField($c, "Schema", $fieldId )) ||
    	    die $ars_errstr;

          $fd->{limit}{maxLength} += 30;

          ars_SetField( $c, "Schema", $fieldId, {
            permissions => { 505 => "change", 506 => "view" },
            limit       => $fd->{limit},
          } ) || die $ars_errstr;

This function was introduced in version 1.90 of ARSperl

Back to Table of Contents