Form
- class q2_sdk.hq.db.form.UiTextIds(demo, display, html)
Bases:
tuple
UiTextIds(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[source]
Bases:
BaseFormRow
-
AccountHydraProductCodes:
StringElement
= 'AccountHydraProductCodes'
-
AccountRightsBitFlag:
IntElement
= 'AccountRightsBitFlag'
-
AccountRightsIsExplicit:
StringElement
= 'AccountRightsIsExplicit'
-
Advanced:
StringElement
= 'Advanced'
-
Config:
StringElement
= 'Config'
-
FormID:
IntElement
= 'FormID'
-
CallWedgeBeforeRender:
BoolElement
= 'CallWedgeBeforeRender'
-
DemoHtmlUiTextElementID:
IntElement
= 'DemoHtmlUiTextElementID'
-
DisplayNameUiTextElementID:
IntElement
= 'DisplayNameUiTextElementID'
-
DisplayNameUiTextElementShortName:
StringElement
= 'DisplayNameUiTextElementShortName'
-
HtmlDataUiTextElementID:
IntElement
= 'HtmlDataUiTextElementID'
-
MessageRecipientGroupID:
IntElement
= 'MessageRecipientGroupID'
-
NewWindow:
BoolElement
= 'NewWindow'
-
ShortName:
StringElement
= 'ShortName'
-
Url:
StringElement
= 'Url'
-
WedgeAddressID:
IntElement
= 'WedgeAddressID'
-
WedgePathName:
StringElement
= 'WedgePathName'
-
PropertyID:
IntElement
= 'PropertyID'
-
AccountHydraProductCodes:
- class q2_sdk.hq.db.form.CentralFormRow[source]
Bases:
BaseFormRow
-
FormID:
IntElement
= 'FormID'
-
ShortName:
StringElement
= 'ShortName'
-
Url:
StringElement
= 'Url'
-
Config:
StringElement
= 'Config'
-
Description:
StringElement
= 'Description'
-
WedgePathName:
StringElement
= 'WedgePathName'
-
CallWedgeBeforeRender:
BoolElement
= 'CallWedgeBeforeRender'
-
HtmlData:
StringElement
= 'HtmlData'
-
FormParentID:
IntElement
= 'FormParentID'
-
WedgeAddressTypeName:
StringElement
= 'WedgeAddressTypeName'
-
PropertyID:
IntElement
= 'PropertyID'
-
FormID:
- class q2_sdk.hq.db.form.GroupsWithContext(property_id, groups, property_name, property_long_name)[source]
Bases:
object
GroupsWithContext(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:
list
[BaseFormRow
]
- class q2_sdk.hq.db.form.Form(logger, hq_credentials=None, ret_table_obj=None)[source]
Bases:
InstallerObj
Allows 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 ifFalse
or 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
]