Changes

Jump to: navigation, search

SmartCheck Validation

417 bytes added, 13:30, 27 June 2019
no edit summary
And the following is an example with multiple languages:
<pre>if(((form.getStr("cf_Strategy").length() - form.getStr("cf_Strategy").replace(';','').length())>4))
{result.isPassed=false;
result.addMsg('cf_@Strategy.id@','You can pick up to 4 primary strategies you use.', 1);
NOTE: When using @sscalculation, you <u>must</u> wrap the syntax in double quotes
===Ensuring an entered date is at least 3 business days away ===
<pre>if(ssConvertDate(form.getStr("cf_Date EOI Revision Deadline"),'@dateformat@','yyyy-mm-dd') < "<!--@sscalculation(SS_FUNC.addbusdays("@date(currentdate)@",3))-->")
{result.isPassed=false;
{result.isPassed=false;
result.addMsg('cf_@Leadership.id@','Leadership question must have minimum 100 words'); }</pre>
 
===Count contacts in a specific role===
Used to ensure at least one contact is attached to the record in a specific role
 
<pre>if("@level1.[#(?object=contact::criteria=rolename IN ('Panel Reviewer - Pending','Panel Reviewer - Accepted')::groupfunction=count)~userid~#]@" < "1")
{result.isPassed=false;
result.addMsg("Please assign reviewers in the Panel Reviewer Pending or Panel Reviewer Accepted role."); }</pre>
==To include other scripts into a SmartCheck script:==
110
edits

Navigation menu