# dhtmlxconnector:dataaction_object [DHX documentation]

DHTMLX Docs & Samples Explorer

Index
dhtmlxconnector

## DataAction Object

#### get_value

method - returns value of named field ( name of column or alias):

      $action->get_value($name)

Parameters:

- name of column or alias.

#### set_value

method sets value of named field:

        $action->set_value($name,$value)

Parameters:

- $name - name or alias of the field
- $value - value of the field in question

#### get_status

method returns action type of the item:

          $action->get_status()

#### set_status

method allows to set the status of operation - do not use it if you need to avoid using custom status:

        $action->set_status($value)

Parameters:

- $value- status of operation

#### get_id

method returns id of the current record:

          $action->get_id()

#### get_data

method returns hash of values:

        $action->get_data()

#### set_response_text

        $action->set_response_text($text);

Parameters:

- $text - any text value , which will be returned on client side with related action structure

#### set_response_xml

method allows to set xml-string , which will be included in response ( if you need to provide just a text - use the method mentioned above ):

        $action->set_response_xml($text)

Parameters:

- $text - any text value , which will be returned on client side with related action structure

#### set_response_attribute

method allows to define custom attribute, which will be added to the related action tag in XML response

        $action->set_response_attribute($name,$value)

#### invalid

method marks provided data as invalid and cancels default update operation:

        $action->invalid();

#### error

method marks operation as invalid and stops in further processing

        $action->error();

#### success

method confirms that operation has been executed correctly and cancels default update operation:

        $action->success();

in case of Insert operation, method can receive one parameter - new ID of element ( which will be updated on client side )

      $action->success($id);

#### add_field

method allows to register field for usage during update|insert|delete operation:

            $action->add_field($name,$value);

Parameters:

- $name - name or alias of the field
- $value - value of the field in question

#### remove_field

method allows to remove one of default fields from db operation:

            $action->remove_field($name,$value)

Parameters:

- $name - name or alias of the field
- $value - value of the field in question

#### get_new_id

method returns ID, received after insert operation ( valid for afterProcessing event only )

           $action->get_new_id();