Community articlehelp method
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.



Description

Provides help information about each of your custom functions in the form development environment (for example, IBM® Forms Designer).

Method

public void help(
   String thePackageName, 
   String theFunctionName,
   int theFunctionID, 
   com.PureEdge.IFSUserDataHolder theFunctionData, 
   com.PureEdge.StringHolder theQuickDesc, 
   com.PureEdge.StringHolder theFunctionDesc, 
   com.PureEdge.StringHolder theSampleCode, 
   com.PureEdge.StringListHolder theArgsNameList, 
   com.PureEdge.StringListHolder theArgsDescList, 
   com.PureEdge.ShortListHolder theArgsFlagList, 
   com.PureEdge.StringHolder theRetValDesc, 
   com.PureEdge.ShortHolder theRetValFlag
   ) throws UWIException;


Parameters

ExpressionTypeDescription
thePackageNameStringThe name of the package that contains the function.
theFunctionNameStringThe name of the function.
theFunctionIDintA unique number that can be used to identify the function.
theFunctionDataIFSUserDataHolderReserved. Although this expression is not used, it must be present.
theQuickDesc StringHolderThe method sets a short one-line description of what the function does.
theFunctionDesc StringHolderThe method will set a longer more detailed description of the function.
theSampleCode StringHolderThe method will set an example of the XFDL code used to call your function, including an example of the function parameters.
theArgsNameList StringListHolderThe method will set a list of arguments that your function takes. See Notes for more information.
theArgsDescList StringListHolderThe method will set a description of each of the arguments in the theArgsNameList. See Notes for more information..
theArgsFlagListShortListHolderThe method will set a list of bit flags representing the type of each argument that the function takes. See Notes for more information.
theRetValDescStringHolderThe method will set a description of your custom function's return value.
theRetValFlagShortHolderThe method will set a bit flag representing the type of the return value. See Notes for more information. Simply use setLiteralEx on this object to store the result.


Returns

Nothing if call is successful or throws a generic exception (UWIException) if an error occurs.

Notes

  • Refer to the table FunctionCall Class Constants API 8 JavaCreate New Article for possible values for:
    • theArgsFlagList
    • theRetValFlag
  • For both theArgsNameList and theArgsDescList, if you have no arguments you must set the value to null. For example:
  •    theArgsNameList.value = null;

Example

   public void help(String thePackageName, 
      String theFunctionName, int theFunctionID, 
      com.PureEdge.IFSUserDataHolder theFunctionData, 
      com.PureEdge.StringHolder theQuickDesc, 
      com.PureEdge.StringHolder theFunctionDesc, 
      com.PureEdge.StringHolder theSampleCode, 
      com.PureEdge.StringListHolder theArgsNameList, 
      com.PureEdge.StringListHolder theArgsDescList, 
      com.PureEdge.ShortListHolder theArgsFlagList, 
      com.PureEdge.StringHolder theRetValDesc, 
      com.PureEdge.ShortHolder theRetValFlag) throws UWIException
   {
   /* Switch on theFunctionID. This makes it easy for a single FunctionCall
      object to support multiple functions. */
      switch(theFunctionID)
      {
   /* Remember that you must define an ID number for each custom function
      that you create. In the example below the constant MULTIPLY represents
      the identification number for the multiply function. */
         case FciFunctionCall.MULTIPLY:
            theQuickDesc.value = "multiplies two numbers together";
            theFunctionDesc.value = "This function takes two numeric " + 
               "parameters and multiplies the two numbers together and " +
               "returns the result.";
            theSampleCode.value = "\tlabel1 = new label\n" + "\t{\n" + 
               "\t\tvalue = testPackage.multiply(\"10\", field2.value);\n" +
               "\t\tsize =  [\"10\", \"1\"];\n" + "\t}\n"      + 
               "\tfield2 = new field\n"               + 
               "\t{\n" + "\t\tvalue = \"7\";\n" + "\t}\n";
            
   /* Notice that in defining theArgsNameList below, you must create 
     the list before providing a value for each element in the list. */
            theArgsNameList.value = new String [2];
            theArgsNameList.value [0] = "number1";
            theArgsNameList.value [1] = "number2";
   /* Notice that in defining theArgsDescList below, you must create 
      the list before providing a value for each element in the list. */
            theArgsDescList.value = new String [2];
            theArgsDescList.value [0] = "The first number";
            theArgsDescList.value [1] = "The second number";
            theRetValDesc.value = "The result";
            break;
      }
}


Parent topic:
FunctionCall class