Function: delete_form - j5 - 28.0 - Reference - Hexagon

j5 Framework IndustraForm API Reference

Language
English
Product
j5
Search by Category
Reference
j5 Version
2019

j5.IndustraForms.api.delete_form(sa_session=None, form=None, only_if_empty=True, **kwargs)

Deletes an IndustraForm instance and any associations with logbook records. This does not remove the commit history (i.e. audit log) for the form.

It is not necessary to delete associated IndustraForm instances when a logbook record is deleted.

Parameters

  • sa_session – (REQUIRED) The sqlalchemy session with the transaction that the delete statements will be executed in.

  • form – (REQUIRED) The IndustraForm instance that identifies the form to delete. Please note that this instance will be invalidated if it is deleted.

  • only_if_empty – (Default: True) Only remove the form if the content has not been modified by a user.

Returns

  • bool - True if the form was deleted.

Raises

  • Exception - In this case the transaction SHOULD be rolled back.