Jam.py documentation

append

append()

domain: client

language: javascript

class Item class

Description

Open a new, empty record at the end of the dataset.

After a call to append, an application can enable users to enter data in the fields of the record, and can then post those changes to the item dataset using post method, and then apply them to the item database table, using apply method.

The append method

  • checks if item dataset is active , otherwise raises exception

  • if the item is a detail , checks if the master item is in edit or insert state , otherwise raises exception

  • if the item is not a detail checks if it is in browse state , otherwise raises exception

  • triggers the on_before_append event handler if one is defined for the item

  • open a new, empty record at the end of the dataset

  • puts the item into insert state

  • triggers the on_after_append event handler if one is defined for the item.

  • updates data-aware controls