Submit Logic uses condition fields, condition-building syntax, and message formatting to validate records on a UTA/module.
Submit Logic Condition Fields
Each Submit Logic condition includes the following fields.
| Field | Description |
|---|---|
| Order | The sequence in which the condition is evaluated. Conditions run in order. After all conditions run, any that failed stop the submission, and the messages for all failed conditions appear together. |
| Name | A descriptive name for the condition. |
| Description | A description of the condition. |
| Condition | The expression that defines the condition. The record does not change status when the condition evaluates to false. |
| Message | The message displayed when the condition is not met. |
Condition Construction Examples
Conditions reference fields and aggregate functions using the same syntax as the Template/Type Formula. Construct each condition so that it evaluates to TRUE when the record should be submitted. The condition Message appears when the condition evaluates to FALSE, and the record is not submitted.
Example
Checks that the Reviewer Comments field at Level 2 is not left blank.
"@level2.Reviewer Comments.length@"*1 > 0
Or, using an equivalent expression:
CONVERT("@level2.Reviewer Comments.length@",SIGNED INTEGER) > 0
Example
Requires a minimum of three Level 2 items of any type to submit the Level 1 item.
@level2.count(*)@>2
Example
Requires a minimum of three Level 2 items where the type is email to submit the Level 1 item.
@level2.count(*):typename='email'@>2
Example
Requires a minimum of three Level 2 items where the type is email and the status is closed.
@level2.count(*):typename='email' and statusname='closed'@>2
Example
Confirms the submission cut-off date and time has not passed.
"@datetime(currentdate)@"<"@datetime(level1.Contract Start Date)@"
Example
Confirms an XML table node is not blank.
"<ssEscape>@level1.xml.Budget.comment-section.row.comment.nodevalue@</ssEscape>" != ""
Add a condition using this structure, replacing fieldname with the applicable field ensures that fieldname is not empty:
CONVERT("@level1.fieldname.length@",SIGNED INTEGER) > 0
Example
The commission rate for the associated company must exceed 0.3 (30%).
@company.commission rate@ > 0.3
Example
The associated branch name must be xyz.
@branch.name@ = 'xyz'
Example
The total salaries field in the Level 1 entity must be less than $400,000.00.
@total salaries@ < 400000
Example
The sum of the megawatts field across all Level 2 entries must exceed 5.
@level2.sum(megawatts)@ > 5
Example
The same as the previous example, but using the custom field ID.
@level2.sum(#12345#)@ > 5
Example
The date in the Anticipated Project End Date field must fall between the system-wide Project Start and End Dates.
"@level1.Anticipated Project End Date@" BETWEEN "@rootcompany.Project Start Date@" AND "@rootcompany.Project End Date@"
Example
Ensures that a contact has been added to the Level 1 Person standard field.
"@opportunity.peopleid@"!="0"
Example
Ensures there is precisely one contact at Level 1 with the role of Supervisor.
"@contacts.count(*):rolename='Supervisor'@"="1"
Example
Ensures there are fewer than three Funding Agencies in the Companies section.
"@companies.count(*):rolename='Funding Agency'@"<"3"
Example
Ensures the contact assigned at Level 1 with the role of Supervisor is not also assigned the role of Referee.
"@contact.supervisor.email@"!="@contact.referee.email@"
Example
Ensures a Proposal has been uploaded in the single file upload field at Level 1.
"@level1.Proposal.filename@"!=""
Example
Ensures the number of pages for a PDF file upload field does not exceed six pages.
"@level1.Plan Details.numofpages@"<=6
Example
Ensures the number of files uploaded to a Multiple Files upload field is greater than zero.
"@level1.Multiple File Uploads.numoffiles@">0
Example
Ensures the Level 1 type is New Grant and that the number of items entered in the XML worksheet exceeds two.
"@level1.type@"!="New Grant"||"@level1.xml.ExternalPeers.peer.peer.nodecount@">2
Example
Ensures the Amount Awarded field is less than or equal to $500,000.00. The .value is required when the Amount Awarded field is stored in currency format.
"@level1.Amount Awarded.value@" <= 500000
Example
Ensures the current user cannot submit more than one review.
INSTR("@level1.[#(?object=activity::criteria=typename='Referee Form' and statusname='Submitted' and eownerid=@me.userid@)~index~#]@","1")=0
Example
Confirms the payment total does not exceed the approved total.
@level1.Grant Amount@>=@level1.level2.sum(#1478912.value#)@+@level2.#1478912.value#@
Example
Confirms at least three checkboxes have been selected in a Select Many - Check Boxes field.
LENGTH("@level1.Check Boxes@")-LENGTH(REPLACE("@level1.Check Boxes@",";",""))+1>=3Message Construction
Messages give the user details about an unmet condition. They appear in a pop-up window when a Submit Logic condition fails on submit. If multiple conditions fail, the messages appear together in a single pop-up. Field names and aggregate functions can be used in messages the same way they are used in conditions.
Example
The message displays when @level2.count(*)@>2 evaluates to false.
At least three appendices are required to submit this proposal, but only @level2.count(*)@ were found. Check the proposal, and then submit it again.