<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
 xmlns:o="urn:schemas-microsoft-com:office:office"
 xmlns:x="urn:schemas-microsoft-com:office:excel"
 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
 xmlns:html="http://www.w3.org/TR/REC-html40">
 <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
  <Author>N52 Formula Manager</Author>
  <LastAuthor>N52 Formula Manager</LastAuthor>
  <Created>6/7/2016 2:57:29 PM</Created>
  <LastSaved>6/7/2016 2:57:29 PM</LastSaved>
  <Company>N52 Formula Manager</Company>
  <Version>12.00</Version>
 </DocumentProperties>
 <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
  <WindowHeight>10005</WindowHeight>
  <WindowWidth>10005</WindowWidth>
  <WindowTopX>110</WindowTopX>
  <WindowTopY>125</WindowTopY>
  <ProtectStructure>False</ProtectStructure>
  <ProtectWindows>False</ProtectWindows>
 </ExcelWorkbook>
 <Styles>
  <Style ss:ID="Default" ss:Name="Normal">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="10" ss:Color="#000000"/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </Style>
 </Styles>
 <Worksheet ss:Name="Formula">
  <Table><Row>
<Cell><Data ss:Type="String">Name</Data></Cell>
<Cell><Data ss:Type="String">Formula Type</Data></Cell>
<Cell><Data ss:Type="String">Formula Description</Data></Cell>
<Cell><Data ss:Type="String">Status</Data></Cell>
<Cell><Data ss:Type="String">Status Reason</Data></Cell>
<Cell><Data ss:Type="String">Source Entity Name</Data></Cell>
<Cell><Data ss:Type="String">Source Entity Property</Data></Cell>
<Cell><Data ss:Type="String">Source Relationship</Data></Cell>
<Cell><Data ss:Type="String">Target Entity Name</Data></Cell>
<Cell><Data ss:Type="String">Target Entity Property</Data></Cell>
<Cell><Data ss:Type="String">Event</Data></Cell>
<Cell><Data ss:Type="String">Stage</Data></Cell>
<Cell><Data ss:Type="String">Display Format</Data></Cell>
<Cell><Data ss:Type="String">Auto Number Value</Data></Cell>
<Cell><Data ss:Type="String">Execution Order</Data></Cell>
<Cell><Data ss:Type="String">Message</Data></Cell>
<Cell><Data ss:Type="String">Enable PreValue Check</Data></Cell>
<Cell><Data ss:Type="String">Enable Find Function FetchXml Optimization</Data></Cell>
<Cell><Data ss:Type="String">Source Entity Property PreValue Check</Data></Cell>
<Cell><Data ss:Type="String">Category</Data></Cell>
<Cell><Data ss:Type="String">Sub Category</Data></Cell>
<Cell><Data ss:Type="String">Source Entity Property ClientSide</Data></Cell>
<Cell><Data ss:Type="String">Mode</Data></Cell>
<Cell><Data ss:Type="String">ShortCode</Data></Cell>
<Cell><Data ss:Type="String">Deployment Solution</Data></Cell>
<Cell><Data ss:Type="String">ClientSide Data Payload</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">Interaction - Veteran OnChange</Data></Cell>
<Cell><Data ss:Type="String">217890015</Data></Cell>
<Cell><Data ss:Type="String">if (ContainsData([bah_interactions.bah_veteranid]) and ContainsData([bah_interactions.vhacrm_lobid]) and [bah_interactions.vhacrm_anonymousveteran_bool]=0,
  
  SmartFlow(
    
   	SetVar(&#39;defaultdate&#39;, &#39;1/1/1900&#39;),
    
    /* Get Interactions */
   	if(ContainsData([bah_interactions.vhacrm_interactionno_text]), 
      SetVar(&#39;i&#39;, DateDiff(FindMaxFD(&#39;GetInteractions&#39;, &#39;createdon&#39;, GetVar(&#39;defaultdate&#39;), true), UtcDate(), &#39;d&#39;)),
      SetVar(&#39;i&#39;, DateDiff(FindMaxFD(&#39;GetInteractions2&#39;, &#39;createdon&#39;, GetVar(&#39;defaultdate&#39;), true), UtcDate(), &#39;d&#39;))),
    
    /* Get Requests */
   	SetVar(&#39;r&#39;, DateDiff(FindMax(&#39;incident&#39;, &#39;contactid&#39;, [bah_interactions.bah_veteranid], &#39;createdon&#39;, GetVar(&#39;defaultdate&#39;), true), UtcDate(), &#39;d&#39;)),
    
    /* Get Activities */
   	SetVar(&#39;a&#39;, DateDiff(FindMax(&#39;activitypointer&#39;, &#39;regardingobjectid&#39;, [bah_interactions.bah_veteranid], &#39;createdon&#39;, GetVar(&#39;defaultdate&#39;), true), UtcDate(), &#39;d&#39;)),
    
    /* Get Minimum for Days Since Last Contact */
    SetVar(&#39;number&#39;, MinOf(GetVar(&#39;i&#39;), GetVar(&#39;r&#39;), GetVar(&#39;a&#39;))),
    
    if (GetVar(&#39;number&#39;) &gt; 9000,
      SetVar(&#39;min&#39;, &#39;&#39;),
      SetVar(&#39;min&#39;, ToString(GetVar(&#39;number&#39;)))),
    
    if (GetVar(&#39;number&#39;) &gt; 30 and GetVar(&#39;number&#39;) &lt; 9001,
      SetVar(&#39;min&#39;, &#39;&gt; 30 days&#39;),
      SetVar(&#39;min&#39;, ToString(GetVar(&#39;min&#39;)))),
    
    /* Get Open Requests */   
  	SetVar(&#39;or&#39;, FindCount(&#39;incident&#39;, SetFindAnd(&#39;statecode&#39;, &#39;contactid&#39;), SetFindAnd(&#39;0&#39;, [bah_interactions.bah_veteranid]), &#39;incidentid&#39;, 0, true)),
    
    /* Get Special Instructions */     
    SetVar(&#39;spi&#39;, FindValueFD(&#39;GetSpecialInstructions&#39;, &#39;vhacrm_instruction_text&#39;, &#39;none&#39;, true)),
    
    /* Copy Info from Veteran */
   	SetVar(&#39;cb&#39;, FindValue(&#39;contact&#39;, &#39;contactid&#39;, [bah_interactions.bah_veteranid], &#39;telephone1&#39;, &#39;&#39;, true)),
    SetVar(&#39;em&#39;, FindValue(&#39;contact&#39;, &#39;contactid&#39;, [bah_interactions.bah_veteranid], &#39;emailaddress1&#39;, &#39;&#39;, true)),
    SetVar(&#39;fn&#39;, FindValue(&#39;contact&#39;, &#39;contactid&#39;, [bah_interactions.bah_veteranid], &#39;firstname&#39;, &#39;&#39;, true)),
    SetVar(&#39;ln&#39;, FindValue(&#39;contact&#39;, &#39;contactid&#39;, [bah_interactions.bah_veteranid], &#39;lastname&#39;, &#39;&#39;, true)),
    SetVar(&#39;ssn&#39;, FindValue(&#39;contact&#39;, &#39;contactid&#39;, [bah_interactions.bah_veteranid], &#39;bah_ssn_text&#39;, &#39;&#39;, true)),
    SetVar(&#39;edi&#39;, FindValue(&#39;contact&#39;, &#39;contactid&#39;, [bah_interactions.bah_veteranid], &#39;bah_edipi_text&#39;, &#39;&#39;, true)),
    SetVar(&#39;g&#39;, ToString(FindValue(&#39;contact&#39;, &#39;contactid&#39;, [bah_interactions.bah_veteranid], &#39;gendercode&#39;, &#39;&#39;, true))),
    SetVar(&#39;dob&#39;, ToString(FindValue(&#39;contact&#39;, &#39;contactid&#39;, [bah_interactions.bah_veteranid], &#39;bah_dob_date&#39;, &#39;&#39;, true))), 
 
    SmartFlowReturn(
    MultipleClientSide(
        if(GetVar(&#39;spi&#39;) != &#39;none&#39;, SetFormNotification(GetVar(&#39;spi&#39;), &#39;WARNING&#39;, &#39;spi&#39;), ClearFormNotification(&#39;spi&#39;)),
        if(GetVar(&#39;or&#39;) != 0,
          SetFormNotification(StringFormat(&#39;Veteran has {0} open Request(s)&#39;, GetVar(&#39;or&#39;)), &#39;INFO&#39;, &#39;or&#39;), 
          ClearFormNotification(&#39;or&#39;)),
        SetClientSideField(&#39;vhacrm_dayssincelastcontact_text&#39;, GetVar(&#39;min&#39;)) ,
        HideSections(&#39;tab_interactioninformation.section_veteraninfo_input&#39;),
        ShowSections(&#39;tab_interactioninformation.section_veteraninfo&#39;),
        CollapseTabs(&#39;tab_veteransearch&#39;),
        if(GetVar(&#39;cb&#39;) != &#39;&#39;, 
          SetClientSideField(&#39;vhacrm_callbacknumber_text&#39;, GetVar(&#39;cb&#39;)), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;)),
        if(GetVar(&#39;cb&#39;) != &#39;&#39;, 
          SetClientSideField(&#39;vhacrm_primaryphonenumber_text&#39;, GetVar(&#39;cb&#39;)), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;)),
        if(GetVar(&#39;em&#39;) != &#39;&#39;, 
          SetClientSideField(&#39;vhacrm_emailaddress_text&#39;, GetVar(&#39;em&#39;)), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;)),
        if(GetVar(&#39;ln&#39;) != &#39;&#39;, 
          SetClientSideField(&#39;vhacrm_vetlastname_text&#39;, GetVar(&#39;ln&#39;)), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;)),
        if(GetVar(&#39;fn&#39;) != &#39;&#39;, 
          SetClientSideField(&#39;vhacrm_vetfirstname_text&#39;, GetVar(&#39;fn&#39;)), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;)),
        if(GetVar(&#39;ssn&#39;) != &#39;&#39;, 
          SetClientSideField(&#39;bah_ssn_text&#39;, GetVar(&#39;ssn&#39;)), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;)),
        if(GetVar(&#39;edi&#39;) != &#39;&#39;, 
          SetClientSideField(&#39;vhacrm_edipi_text&#39;, GetVar(&#39;edi&#39;)), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;)),
        if(GetVar(&#39;g&#39;) != &#39;&#39;, 
          SetClientSideField(&#39;vhacrm_gender_code&#39;, GetVar(&#39;g&#39;)), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;)),
        if(GetVar(&#39;dob&#39;) != &#39;&#39;, 
          SetClientSideField(&#39;bah_dob_date&#39;, GetVar(&#39;dob&#39;)), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;)),
        if(GetVar(&#39;ln&#39;) != &#39;&#39; and GetVar(&#39;fn&#39;) != &#39;&#39; and [bah_interactions.vhacrm_lobidname]=&#39;NCCHV&#39;, 
          iftrue([bah_interactions.bah_relationshiptoveteran_code]=&#39;713770000&#39;,
            SetClientSideField(&#39;bah_firstname_text&#39;, GetVar(&#39;fn&#39;))), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;)),
        if(GetVar(&#39;ln&#39;) != &#39;&#39; and GetVar(&#39;fn&#39;) != &#39;&#39; and [bah_interactions.vhacrm_lobidname]=&#39;NCCHV&#39;, 
          iftrue([bah_interactions.bah_relationshiptoveteran_code]=&#39;713770000&#39;,
            SetClientSideField(&#39;bah_lastname_text&#39;, GetVar(&#39;ln&#39;))), 
          SetClientSideField(&#39;vhacrm_temp_text&#39;, &#39;&#39;))
      )
    )
    
  ),
  
  &#39;NoOp&#39;
)</Data></Cell>
<Cell><Data ss:Type="String">0</Data></Cell>
<Cell><Data ss:Type="String">1</Data></Cell>
<Cell><Data ss:Type="String">bah_interactions</Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String">217890002</Data></Cell>
<Cell><Data ss:Type="String">217890002</Data></Cell>
<Cell><Data ss:Type="String">217890000</Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String">False</Data></Cell>
<Cell><Data ss:Type="String">True</Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String">Health Benefits.onchange.bah_veteranid|Health Benefits.onchange.bah_veteranid|Help Desk.onchange.bah_veteranid|Help Desk.onchange.bah_veteranid|Read Only.onchange.bah_veteranid|NCCHV.onchange.bah_veteranid|NCCHV.onchange.bah_veteranid</Data></Cell>
<Cell><Data ss:Type="String">217890001</Data></Cell>
<Cell><Data ss:Type="String">O29</Data></Cell>
<Cell><Data ss:Type="String">North52FormulaManagerDeploymentSolution</Data></Cell>
<Cell><Data ss:Type="String">*:CreateUpdate</Data></Cell>
</Row>

  </Table>
  <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
   <Selected/>
   <Panes>
    <Pane>
     <Number>3</Number>
     <ActiveRow>6</ActiveRow>
     <ActiveCol>1</ActiveCol>
    </Pane>
   </Panes>
   <ProtectObjects>False</ProtectObjects>
   <ProtectScenarios>False</ProtectScenarios>
  </WorksheetOptions>
 </Worksheet>
</Workbook>