This documentation supports the 20.02 version of Remedy Action Request (AR) System.

To view an earlier version, select the version from the Product version menu.


Defining database functions for Remedy Smart Reporting in Remedy AR System Server

As an AR System administrator, you can use the AR System JDBC:Generic Db Functions form to define a database function on the AR System server, which can then be used by a Remedy Smart Reporting administrator or a report writer for reporting purposes. In the form, you define the database functions by passing arguments to the function and by defining the return type of the function. You can pass up to 10 arguments to a function.

Before you begin

You must run the database scripts required for using the AR System JDBC:Generic Db Functions form using the Java driver. These scripts are in the respective database folders located at ARSystem\artools\arjdbc. Before defining database functions through the AR System JDBC:Generic Db Functions form, ensure that the database scripts have successfully ran by checking the following parameters in Centralized Configuration:

ParameterValue
ARJdbc-Script-Execution-Status
Done

Use-Enum-Field-Recompute

T

If the Centralized Configuration parameter ARJdbc-Script-Execution-Status has the value Error and Use-Enum-Field-Recompute has the value F, then view the arcustomdbfunction.log file located at ARSystem\Arserver\Db for details. After viewing the log, run the database scripts again by issuing the following command via the Java driver:

PERFORM-CUSTOM-DB-FUNCTION-CHANGE

Important

  • It can take up to one hour for the script to run; however, script processing does not impact any AR System server functionality.
  • Prior to running this script you must ensure that the default locale of your database is set to English.

For information on how to run commands by using the Java driver, see To execute commands using the Java driver.

To execute commands using the Java driver

  1. From the command prompt, go to the C:\Program Files\BMC Software\ARSystem\Arserver\api\lib directory and execute the javadriver.bat command.
  2. Execute the log command with the required options.
    If the port is not default (0), then run the SSP command to set the server port and execute the VER command to verify the results of the command.
  3. Execute the proc command.
  4. Execute the PERFORM-CUSTOM-DB-FUNCTION-CHANGE command.
    The commands asks for the Wait for process to complete (F) value
  5. Enter T.

To define a new database function

Perform the following steps to define a function in Remedy AR System server for a particular database:

  1. Login to Remedy AR System.
  2. Select AR System Administrator > AR System JDBC:Generic Db Functions.

  3. On the AR System JDBC:Generic Db Functions form, click New request.
  4. Enter values for the following fields:

    Field name

    Description

    Function Name

    Name of the database function.
    Note: The function name is case sensitive.

    Function Return Type

    Return type of the database function.
    Function InformationSpecific information about the database function.
    Function GUIDA unique function identifier.
    Variable ArgumentIndicates whether the number of arguments required for the function are fixed or variable.
    A Yes value indicates that the number of arguments required for the function is not fixed. When you select Yes, all the argument data type fields are disabled.
    A No value indicates that the number of arguments required for the function is fixed.
    Function Database TypeThe database for which you are creating the function request.
    Minimum Function Argument NumberMinimum number of arguments that you want to pass to the function.
    Arg1 Data TypeData type of argument one.
    Arg2 Data TypeData type of argument two.
    Arg3 Data TypeData type of argument three.
    Arg4 Data TypeData type of argument four.
    Arg5 Data TypeData type of argument five.
    Arg6 Data TypeData type of argument six.
    Arg7 Data TypeData type of argument seven.
    Arg8 Data TypeData type of argument eight.
    Arg9 Data TypeData type of argument nine.
    Arg10 Data TypeData type of argument ten.
    SubmitterName of the database function request submitter.
    Create DateDatabase function creation date.
    Last Modified byName of the user who last modified the request.
    Modified DateLast modified date.
  5. Click Save.

    Note

    For troubleshooting issues related to defining functions in AR System Server, see the API and SQL log files.

    Where to go from here

    Advanced Authoring Open link

    Freehand SQL Open link


Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Richard Cooke

    It would be good to include the component in the Centralized Config for the values...

    ARJdbc-Script-Execution-Status (Component name: com.bmc.arsys.server.shared)

    Although Use-Enum-Field-Recompute, does not show up in the documentation https://docs.bmc.com/docs/ars91/en/configuration-settings-s-z-609074226.html

    Jul 27, 2022 11:30
    1. Maithili Deshpande

      Hi Richard, 

      Thank you for pointing out this issue with the content. We have corrected the topic with your feedback.

      For the description of Use-Enum-Field-Recompute, pls refer to the Configuration settings topic in version 19.02 and later. Forexample, https://docs.bmc.com/docs/ars1902/configuration-settings-s-z-836455163.html.

      Regards,
      Maithili

      Aug 19, 2022 02:32
  2. Richard Cooke

    Please see https://docs.bmc.com/docs/ars2002/using-the-driver-program-909638498.html for all the steps for using the driver program.. this page is missing a few steps.

    Aug 01, 2022 01:25
    1. Maithili Deshpande

      Hi Richard, 

      Thank you for pointing out this issue with the content. We have updated the topic with a link to the detailed steps in the Using the driver program topic.

      Regards,
      Maithili

      Aug 19, 2022 02:33