Interface QapiCustomForm
- All Superinterfaces:
ApprovableColumns,InputsColumns,Map<String,,SelectableExpression> OutputsColumns,PersistedObjectColumns,Tables.Columns,Tables.Table
public interface QapiCustomForm
extends Tables.Table, PersistedObjectColumns, InputsColumns, OutputsColumns, ApprovableColumns
Table of the Custom Forms of one Custom Form Type. Each row is one Custom Form or one of its revisions.
Obtain it with api.queryApi().tables().customForms(String), passing the unique name of the Custom Form
Type. When access rights are applied, the table contains only the Custom Forms that the current user is allowed to
see. Besides the columns below, the table offers the ID and audit columns of PersistedObjectColumns, the
approval workflow columns of ApprovableColumns, and the inputs and outputs of the form through
InputsColumns.input(String) and OutputsColumns.output(String). The attribute fields configured on the
Custom Form Type are accessed as properties by their configured name, for example cf.Description, or
cf["My Field"] when the name contains spaces.
Example, the approved Custom Forms of a type:
import net.pricefx.common.api.CustomFormStatus
def q = api.queryApi()
def cf = q.tables().customForms("CFO_revisions")
return q.source(cf, [cf.uniqueName(), cf.label(), cf.rootUniqueName(), cf.submitDate()],
cf.formStatus().equal(CustomFormStatus.APPROVED))
.stream { it.collect { it } }
- Since:
- 15.3.13 - Southside, 16.0.4 - Black Cat
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface InputsColumns
InputsColumns.InputColumnsNested classes/interfaces inherited from interface OutputsColumns
OutputsColumns.OutputColumns -
Method Summary
Modifier and TypeMethodDescriptionTo filter on the status, pass the enum constant, as in the example of this class:cf.formStatus().equal(CustomFormStatus.APPROVED).label()A revision keeps the label of the form it revises.All revisions of the same form share this value.The value isnulluntil the Custom Form is submitted for approval, or approved directly when no approval is required.A revision gets a new unique name derived from the unique name of the original Custom Form, by default in the format<original unique name>-REV-<revision number>.Methods inherited from interface ApprovableColumns
approvedByName, deniedByName, submittedByName, workflowStatusMethods inherited from interface InputsColumns
inputMethods inherited from interface Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from interface OutputsColumns
outputMethods inherited from interface PersistedObjectColumns
createDate, createdBy, id, lastUpdateBy, lastUpdateDate, version
-
Method Details
-
uniqueName
SelectableExpression uniqueName()A revision gets a new unique name derived from the unique name of the original Custom Form, by default in the format<original unique name>-REV-<revision number>.- Returns:
- the uniqueName column (the unique name of the Custom Form) as a String expression
- See Also:
-
label
SelectableExpression label()A revision keeps the label of the form it revises.- Returns:
- the label column (the name of the Custom Form as displayed to users) as a String expression
-
formStatus
SelectableExpression formStatus()To filter on the status, pass the enum constant, as in the example of this class:cf.formStatus().equal(CustomFormStatus.APPROVED).- Returns:
- the formStatus column (the status of the Custom Form) as an Enum expression
- See Also:
-
rootUniqueName
SelectableExpression rootUniqueName()All revisions of the same form share this value. The value isnullfor the original Custom Form itself. ReplacesrootUN(), which was available in 15.3.13 and 16.0.4 only.- Returns:
- the rootUniqueName column (the unique name of the original Custom Form that a revision was created from) as a String expression
- Since:
- 15.3.14 - Southside, 16.1.1 - Black Cat
- See Also:
-
userGroupEdit
SelectableExpression userGroupEdit()- Returns:
- the userGroupEdit column (the user group whose members can edit the Custom Form) as a String expression
- See Also:
-
userGroupViewDetails
SelectableExpression userGroupViewDetails()- Returns:
- the userGroupViewDetails column (the user group whose members can view the details of the Custom Form) as a String expression
- See Also:
-
submitDate
SelectableExpression submitDate()The value isnulluntil the Custom Form is submitted for approval, or approved directly when no approval is required.- Returns:
- the submitDate column (the date and time when the Custom Form was submitted for approval) as a DateTime expression
- See Also:
-