Query Extension Samples

Here are some sample use cases for the Query Extensions.

Service and Support

Next Issue Avoidance

  • Returns parent cases of related cases.

      (NOT @syssfid=={!>id})
      (NOT @syssfcaseid=={!>id})
      /*--- Get the parent cases ---*/
      {{relatedCases = @objecttype=="Case" $some(keywords: '{!>Subject}', match:1) @sfparentcasenumber $correlateResultSet(resultSet: @syssfid=={!Id}, field: '@sysconcepts', maximumValues: '25', modifier: '1000')}}
      
      /*--- Extract the parent cases from the related cases ---*/
      $valuesToResultSet(values: $valuesOfField(field: '@sfparentcasenumber', resultSet: {{relatedCases}}), field: '@sfcasenumber')
    
  • Returns knowledge docs related to parent cases of related cases.

      (NOT @syssfid=={!>id})
      (NOT @syssfcaseid=={!>id})
      
      /*--- Extract related cases ---*/
      {{relatedCases = @objecttype=="Case" $some(keywords: '{!>Subject}', match:1) @sfparentcasenumber $correlateResultSet(resultSet: @syssfid=={!Id}, field: '@sysconcepts', maximumValues: '25', modifier: '1000')}}
      /*--- Extract parent cases of related cases ---*/
      {{parentCases = $valuesToResultSet(values: $valuesOfField(field: '@sfparentcasenumber', resultSet: {{relatedCases}}), field: '@sfcasenumber' )}}
      /*--- Find some relevant knowledge ---*/
      $some(keywords:$removeStopWords(keywords:$anyKeywords(keywords:$valuesOfField(field: '@systitle', resultSet: {{parentCases}}))))
    
Recommended Articles