Form
- class q2_sdk.hq.db.form.UiTextIds(demo, display, html)
Bases:
tupleUiTextIds(demo, display, html)
Create new instance of UiTextIds(demo, display, html)
- demo
Alias for field number 0
- display
Alias for field number 1
- html
Alias for field number 2
- class q2_sdk.hq.db.form.FormRow(element, row_class=None, rename_fields=None)[source]
Bases:
BaseFormRow-
AccountHydraProductCodes:
str
-
AccountRightsBitFlag:
int
-
AccountRightsIsExplicit:
str
-
Advanced:
str
-
Config:
str
-
FormID:
int
-
CallWedgeBeforeRender:
bool
-
DemoHtmlUiTextElementID:
int
-
DisplayNameUiTextElementID:
int
-
DisplayNameUiTextElementShortName:
str
-
HtmlDataUiTextElementID:
int
-
MessageRecipientGroupID:
int
-
NewWindow:
bool
-
ShortName:
str
-
Url:
str
-
WedgeAddressID:
int
-
WedgePathName:
str
-
PropertyID:
int
-
AccountHydraProductCodes:
- class q2_sdk.hq.db.form.CentralFormRow(element, row_class=None, rename_fields=None)[source]
Bases:
BaseFormRow-
FormID:
int
-
ShortName:
str
-
Url:
str
-
Config:
str
-
Description:
str
-
WedgePathName:
str
-
CallWedgeBeforeRender:
bool
-
HtmlData:
str
-
FormParentID:
int
-
WedgeAddressTypeName:
str
-
PropertyID:
int
-
FormID:
- class q2_sdk.hq.db.form.GroupsWithContext(property_id, groups, property_name, property_long_name)[source]
Bases:
objectGroupsWithContext(property_id: str, groups: list[str], property_name: str | None, property_long_name: str | None)
-
property_id:
str
-
groups:
list[str]
-
property_name:
str|None
-
property_long_name:
str|None
-
property_id:
- async q2_sdk.hq.db.form.get_form_groups(logger, hq_credentials, property_id)[source]
- Return type:
list[str]
- async q2_sdk.hq.db.form.add_groups_to_forms(logger, hq_credentials, forms)[source]
- Return type:
Sequence[BaseFormRow]
- class q2_sdk.hq.db.form.Form(logger, hq_credentials=None, ret_table_obj=None)[source]
Bases:
InstallerObjAllows for operations on Online form and Central forms.
Programmatic access to the Q2 database. Not as flexible as a true ORM, but takes the guesswork out of database schemas and ensures safety in the transactions.
- Parameters:
logger – Reference to calling request’s logger (self.logger in your extension)
hq_credentials (
Optional[HqCredentials]) – HQ Connectivity Information (Defaults to settings file)ret_table_obj (
Optional[bool]) – Flag to return list of LXML elements ifFalseor TableRow objects from DB calls ifTrue(Defaults to settings file)
- GET_BY_NAME_KEY = 'ShortName'
- NAME = 'Form'
- async get(serialize_for_cli=False, form_id=None, with_groups=False)[source]
- Parameters:
serialize_for_cli – Used when running from the command line
form_id (
Optional[int]) – Q2_Form.FormIDwith_groups – Include group associations (can be costly for large payloads)
- Return type:
list[FormRow]
- async get_central(serialize_for_cli=False, form_id=None)[source]
- Return type:
list[CentralFormRow]