Difference between revisions of "SsGet"

From SmartWiki
Jump to: navigation, search
Line 60: Line 60:
 
Performed by: @me.fullname@<br />
 
Performed by: @me.fullname@<br />
 
<br />
 
<br />
 +
</pre>
 +
 +
To check values stored as text, rather than actual Organization or Contact records the following syntax can be used. The example includes a list of Board Directors stored as XML data in a field named '''Board of Directors''':
 +
<pre>
 +
@parent.client.xml.Board of Directors XML.boardDirectors.boardDirectorsAdd[#$$ssGet(WatchList,company;;owner;;;;3;;Grant Seeker,Executive Director,Board Member;;<strong>Board Member Search:</strong> ~Name.nodevalue~<br />Matches Found: [[recordcount]];;<table class="xmlSectionTable"><tr><th class="xmlHead">Result</th><th class="xmlHead">ID</th><th class="xmlHead">Name</th><th class="xmlHead">Type</th><th class="xmlHead">Alias</th><th class="xmlHead">Details</th><th class="xmlHead">Score</th></tr><tr id="matchfound"><td class="xmlCell">[[index]]</td><td class="xmlCell">[[id]]</td><td class="xmlCell">[[name]]</td><td class="xmlCell">[[type]]</td><td>[[alias]]</td><td>[[details]]</td><td class="xmlCell">[[score]]</td></tr></table>;;unparsedname=~Name.nodevalue~)$$#]@
 
</pre>
 
</pre>
  

Revision as of 13:54, 11 November 2016

The ssGet variable is used to extract information from databases, including the OFAC (Office of Foreign Assets Control) database, U.S. census data and Janus, SmartSimple’s Machine Learning tool.

The syntax for the ssGet variable varies by the database from which information is being returned.

Returning information from the Office of Foreign Assets Control (OFAC)

On-request checks can be made against the OFAC's online database within SmartSimple. For example, on an organization profile, a button can be configured that exposes the following check results:
RunOFACCheck2.png
In the above illustration, the OFAC check has returned one 100% match result on the company name, and no results on the attached contacts.

The syntax for configuring the OFAC check is as follows:

@ssGet(OFAC,entity;;firstname;;lastname;;search options;;roleslist;;meta template;;line template)@

The arguments are as follows:

  • entity: accepts "people", "company" or "all"
  • firstname: an individual's first name or company name
  • lastname: an individual's last name (will be ignored if entity is "company" or "all")
  • search options: accepts "1", "2" or "3"
  • 1 - search current object only (when "entity" is set to "people" or "company")
  • 2 - search people underneath (when "entity" is set to "company" only)
  • 3 - search current object and people underneath (when "entity" is set to "company" only)
  • roleslist: applies if "search options" is set to "2" or "3". Should be in format of comma-delimited role ids or role names (but not ids mixed with names).
  • meta template: Template of how "header" of results will be returned. Default template will be used if empty
variables that can be used include:
  • [[entity]] - search type
  • [[name]] - name of search result
  • [[recordcount]] - number of records returned by OFAC search
  • [[now]] - Current date
Example: "Search type : [[entity]] , Search for : [[name]], Records returned : [[recordcount]], Date :[[now]]"
  • line template: Template of how "body" of results will be returned. Default template will be used if empty
variables that can be used include:
  • [[index]] - index number
  • [[id]] - OFAC ID for result
  • [[name]] - OFAC name for result
  • [[type]] - OFAC type for result
  • [[details]] - returns OFAC designation for entity returned, including date updated in OFAC database
  • [[score]] - percentage score of result match (for example, in the above example, the "company name" Boko Haram returned a 100% match. An organization with the name Bozo Haram will return an 88.9% match with Boko Haram.
Example: <tr><td>[[index]]</td><td>[[id]]</td><td>[[name]]</td><td>[[type]]</td><td>[[details]]</td><td>[[score]]</td></tr>

The following is an example of the configuration of the above display:

OFACCheckWPVConfig.png
Text version here:
<!--filename="OFAC Check Results @name@ @date(currentdate)@"-->
<u>OFACS CHECK RESULTS</u><br />

<div style="pd4ml-display:none;border:2px #009900 solid;background-color:#FFFF66;padding:10px;font-family:arial">
Save these results by clicking the "Save to Server as PDF" button above"
</div>

<br />
@ssGet(OFAC,company;;@name@;;;;3;;Top 5 Staff,Board Officer;;<strong>[[entity]] Search:</strong> [[name]]<br /><strong>Matches Found:</strong> [[recordcount]]<br>;;Result #[[index]]<ul><li>ID: [[id]]</li><li>Name: [[name]]</li><li>Type: [[type]]</li><li>Details: [[details]]</li><li>Score: [[score]]</li></ul>)@
<br />
<br />
<br />
Date/time check performed: <!--@sscalculation(DATE_FORMAT("@datetime(currentdate)@","%m/%d/%Y % %h:%i%p"))--> E.S.T.<br />
Performed by: @me.fullname@<br />
<br />

To check values stored as text, rather than actual Organization or Contact records the following syntax can be used. The example includes a list of Board Directors stored as XML data in a field named Board of Directors:

@parent.client.xml.Board of Directors XML.boardDirectors.boardDirectorsAdd[#$$ssGet(WatchList,company;;owner;;;;3;;Grant Seeker,Executive Director,Board Member;;<strong>Board Member Search:</strong> ~Name.nodevalue~<br />Matches Found: [[recordcount]];;<table class="xmlSectionTable"><tr><th class="xmlHead">Result</th><th class="xmlHead">ID</th><th class="xmlHead">Name</th><th class="xmlHead">Type</th><th class="xmlHead">Alias</th><th class="xmlHead">Details</th><th class="xmlHead">Score</th></tr><tr id="matchfound"><td class="xmlCell">[[index]]</td><td class="xmlCell">[[id]]</td><td class="xmlCell">[[name]]</td><td class="xmlCell">[[type]]</td><td>[[alias]]</td><td>[[details]]</td><td class="xmlCell">[[score]]</td></tr></table>;;unparsedname=~Name.nodevalue~)$$#]@

Returning information from the online U.S. Census database

@ssGet(FFD,FIPS;;@address@ @city@ @state@)@
@ssGet(FFD,Profile;;year;;Address or FIPS code;;level;;[[template]])@
(See Census Integration for detailed description of syntax.)
(See List of census templates for links to full list of values for [[template]])

Returning information from Janus

@ssGet(JANUS,modelname)@

See Also