Changes

Submit Logic

491 bytes added, 22:01, 12 November 2014
no edit summary
The following examples illustrate various examples of the '''submit logic''':
 1. '''Criteria''': The '''Reviewer Comments''' field at level 2 must not be left blank. '''"@level2.Reviewer Comments.length@"*1 > 0''' ''OR'' '''CONVERT("@level2.Reviewer Comments.length@",SIGNED INTEGER) > 0'''1<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Note that the above is the best practice for testing for empty fields, as opposed to using "@level1.Reviewer Comments@"!=""</pre> 2. '''Criteria''': a '''minimum of three''' level 2 items (''of any type'') are required to submit the level 1 item.
'''@level2.count(*)@>2'''
23. '''Criteria''': a '''minimum of three''' level 2 items '''where the type is email''' are required to submit the level 1 item.
'''@level2.count(*):typename='email'@>2'''
34. '''Criteria''': a '''minimum of three''' level 2 items '''where the type is email''' and the '''status is closed''' (''for both items'').
'''@level2.count(*):typename='email' and statusname='closed'@>2'''
45. '''Criteria''': the '''submission cut-off date and time has not passed'''
"@datetime(currentdate)@"<"@datetime(level1.Contract Start Date)@"
:'''Note''' you will need to create a [[System Variable]] that stores the cut-off date and time in the following format: '''yyyy-mm-dd hh:mm:ss''' (24 hour clock)
'''Additional examples''':
* '''CONVERT("@level1.fieldname.length@",SIGNED INTEGER) > 0''' - Ensures that ''fieldname'' is not empty.
* '''@company.commission rate@ > 0.3''' - the commission rate for the associated company must be greater than 0.3 (30%).
* '''@branch.name@ = 'xyz'''' - the associated branch name must be 'xyz'.
* '''@level1.Amount Awarded.value@ <= 500000''' - Ensures that the ''Amount Awarded'' field is under $500,000. The ''.value'' is necessary when the ''Amount Awarded'' field is stored in currency format.
* ''' INSTR("@level1.[#(?object=activity::criteria=typename='Referee Form' and statusname='Submitted' and eownerid=@me.userid@)~index~#]@","1")=0''' - Ensures the current user can't submit more than 1 review
* '''CONVERT("@level1.fieldname.length@",SIGNED INTEGER) > 0''' - Ensures that ''fieldname'' is not empty.
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Note that semicolons cannot be included in submit logic criteria. If using list syntax, employ double colons ("::") to separate arguments.</pre>
8,849
edits