Workflow Case Management Values and Functions
Workflow Case Management expressions and formulas use the same syntax as expressions for student profiles.
These special values are available for Workflow Case Management formulas.
CaseID (integer): A unique integer identifier of the workflow case.
CaseTypeID (character): A unique alphanumeric ID of the workflow case type.
CaseTypeName (character): The full name of the workflow case type.
CaseCreatedDateTime (date/time): The date and time the case was created.
CaseDescription (character): The description field of the case.
CaseClosed (logical): Is true if the case is closed, and false if still open.
CaseClosedDateTime: The date and time the case was closed, or EMPTY is not closed yet.
CaseStepID: The alphanumeric ID of the case step that the workflow case is currently on.
CaseStepName: The full name of the case step that the workflow case is currently on.
CaseStepTargetDate: The target date of the case step that the workflow case is currently on, or EMPTY if a target date is not available.
Examples
To detect the existence of cases.
- EXISTS(Cases, <workflow cases expression>)
For example, the following expressions finds all students that have an open IEP case.
EXISTS(Cases, CaseTypeID='IEP' and CaseClosed=False)
To determine if a particular document exists within the case, use the EXISTS function.
- EXISTS(<template ID>): The case contains a document with the specified template ID.
- EXISTS(<template ID>, <document criteria>): The case contains a document with the specified template ID that meets document criteria.
For example, the following expression detects if the case contains a final IEP.
EXISTS(IEP, DocStatus=Final)
To extract a field value from a document in the case, use the TopOneValueOf function.
- TopOneValueOf(<template id>, <field/expression>, <document criteria>): Returns the value of the field/expression from any document in the case that meets the criteria.
- TopOneValueOf(<template id>, <field/expression>, <document criteria> : <sort>): Returns the value of the field/expression from the first document in the case that meets the criteria prioritized by the sort.
For example, the following expression takes the Document_Finalized_On field from a finalized IEP in the workflow case. If the case does not contain such a document, the expression returns EMPTY.
TopOneValueOf(IEP, Document_Finalized_On, DocStatus=Final)
If there is a possibility that more than one document in the filter exists in the case, introduce an additional sort expression to control which document returns the value. For example, the following will return the latest value of Document_Finalized_On found in any final IEP in the case. The DESC keyword indicates that the sort is descending; without this, the earliest value of Document_Finalized_On would be chosen.
TopOneValueOf(IEP, Document_Finalized_On, DocStatus=Final : Document_Finalized_On DESC)