Function: create_new_logbook_linked_form - j5 - 30 - Reference - Hexagon

j5 Framework IndustraForm API Reference

Language
English
Product
j5
Search by Category
Reference
j5 Version
30

j5.IndustraForms.api.create_new_logbook_linked_form(sa_session=None, form_register_logid=None, logbook_record=None, relationship_type=None, initialisation_element_data=None, previous_form=None, **kwargs)

Creates a new instance of an IndustraForm and associates it with the provided logbook_record.

Parameters

  • sa_session – (REQUIRED) The sqlalchemy session with the transaction that the new form will be added in.

  • form_register_logid – (REQUIRED) The form_register entry logid that identifies the form to create.

  • logbook_record – (REQUIRED) A logbook recordclass instance to link the new form to.

  • relationship_type – If provided, specifies the type of relationship that this IndustraForm has to the containing logbook record.

  • initialisation_element_data – If provided, is a dictionary with element IDs as keys, providing an initialisation value for those elements.

  • previous_form – If provided, is the previous instance of the form whose data should be carried over (if specified).

Returns

  • IndustraForm - The new IndustraForm instance.

Raises

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