Nav view search

Navigation

Search

The Exchange

The place to download pre-configured tickets, code snippets, and solutions

Back

Checking to See if the Database is Configured to Include Job Manager (PS.HasJM)

Use the PS.HasJM function in the PS.js Professional Services library to check whether or not the database is configured to include Job Manager.

Note: This solution is optimized for Virtual Ticket Developer.

If you are using Workgroups DaVinci and are planning to use a Toolbox snippet not marked as DaVinci-compatible, please check with Support for possible compatibility issues before using.

Description

The PS.HasJM function returns the boolean value true if the current database is configured to include the Job Manager application.  This can be used to conditionally execute MetaScript code appropriate for the current database.

Usage Notes

This function can be used in a form's Global MetaScript and elsewhere.

To call this function, the PS.js library must be added to your database as a stored script and referenced in the form's Global MetaScript (//@include "database:PS.js"). See here for instructions.

Function Syntax

PS.HasJM() 

Examples

A simple example that uses PS.HasJM in a button's Click Action Script to determine whether or not the current database includes Job Manager and display an alert box with its determination.

if ( PS.HasJM() ) 
  {  
  alert ( "This database includes Job Manager" )  
  } 
  else 
  { 
  alert ( "This database does not include Job Manager" ) 
  } 

Related

Last Modified:

2011-10-05

by

Chris True