JavaScript method: SCDatum.join()

This method returns the elements of either a ITSMA Service Management Datum array object or a JavaScript array. This method does not use the Service Management global return code values.

Syntax

SCDatum_object.join();

Arguments

There are no arguments for this method.

Return values

A string.

The method returns the elements of an array.

Example

This example does the following:

  • Searches the probsummary table for any incident record you define in the search variable
  • Displays the new incident record as a text string
  • Displays the contents of action field using the join() method

This example requires the following sample data:

  • A valid value for the number field (for example, "IM1010")
  • An incident record with an action field value (for example, "IM1010")
var incidentID;

function findIncident( id )
{
 print( "Searching for Incident record: " + id + "..." );
 var incidentFile = new SCFile( "probsummary" );
 var rc = incidentFile.doSelect( "number=\"" + id + "\"" )
 if ( rc == RC_SUCCESS )
 {
  print( "Success. found Incident record:\n" + incidentFile.getText() );
  print( "Displaying the contents of the action field as an object: " + incidentFile.action );
  print( "Displaying the contents of the action field with join() method: " + incidentFile.action.join() );
  return incidentFile
 }
 else
 {
  print( "Could not find Incident record. " + RCtoString( rc ) );
  return null
 }
}

incidentID = "IM1010";
findIncident( incidentID );