StartForm

You can use this function for Optiva Workflows and Equations.

Purpose

The function Startform opens an Optiva form.

Note: Use multiple statements to open more than one form at a time.

Syntax


int Startform(string formName, string objKey, string args)

Return Value

If the code is successful, a value greater than zero (0) is displayed.

Arguments

Part Description
FormName The Form name you want to open must be specified and must begin with frm.
objKey Optional. The object key or the current object key of the data.
Note: Use empty quotation marks to indicate the current object of the workflow.
Arguments Optional. Depends on the form being opened. Most forms do not require additional arguments.

Description

StartForm opens a form. Use it in the VIEW and EDIT events. Use multiple statements to open more than one form at a time.

Item and formula examples

In this example, the Item form for TOMATOES opens.


Dim lOpen As Long = StartForm("frmitem","TOMATOES")

In the next example, the Formula form for the current formula opens.


Dim lOpen As Long = StartForm("frmformula")

In this example, formula FS-0008\0002 is the base formula that is compared to these specifications: FS-0008-FOR\0002 and FS-0008-PKG\0002.


Dim lOpen As Long = StartForm("FRMCOMPARE", "", "FORMULA;FS-0008\0002;

SPECIFICATION;FS-0008-FOR\0002;FS-0008-PKG\0002")

Two action sets are available in the Optiva seed database in the Lookup by Sets lookup. You can use them to open the Compare form.

You can open the form using the Verify button in the Formula toolbar.

  • VERIFY_FMLA_SPEC (i.e., the default).

    Any specifications on the References tab of the open formula are automatically populated into the Compare List of the Compare form.

  • VERIFY_FMLA_PARENT

    Determines whether the open formula has a parent formula. If it does, the parent is set as the base formula and the open formula as the first line in the Compare List. If the open formula has no parent, then this action set behaves the same as the VERIFY_FMLA_SPEC action set.

Example 1:
startform("FRMITEM");
Example 2:
startform("FRMITEM", "ITEM1");
Example 3:
long lOpen = StartForm("FRMCOMPARE", "", "BASE_FORMULA\0002;SPECIFICATION;SPEC_FOR\0002;SPEC_PKG\0002");

In this example, the formula BASE_FORMULA\0002 serves as the reference formula against which the two specifications, SPEC_FOR\0002 and SPEC_PKG\0002, are compared.