Skip to main content

GT API Documentation

This document describes how to add custom PeopleCode to an eForm using event hooks and parts in the Gideon Taylor eForms™ framework.

Legend

Application Class Path

The convention for the application package where custom PeopleCode should be placed in.

[ApplicationPackage][:Subpackage]:Class

To configure an application package to be used for hooks/parts:

  1. Navigate to Manage GT eForms > GT Technical Setup > Custom Application Packages
  2. Specify the application package at one of the following levels:
    • Form
    • Family/Search Set
    • System (aka Environment) Application Package

Form Type Application Package:
Most event hooks/parts are specific to an individual eForm type and are added to the eForm application package.

Family/Search Set Application Package:
Event hooks/parts that are used by multiple eForms in a Family or SearchSet can be placed in an application package for that eForm group.

System Application Package:
Event hooks/parts that are used by multiple eForms across form Families or Search Sets can be applied to the entire environment and placed in an system application package.

A screenshot of the Custom Application Packages page

Extends

Some hook/part classes must extend a specific parent class.

Class EventHook extends [AppPkg][:SubPkg]:Class

Method

The convention for the method name, parameters and return type.

Annotations

Whether or not the method supports annotations

Register

If additional steps are required in the PIA to make it available for use in the Form Type configuration or included in the dependency network

Test

Steps to test the hook/part.

Override

Additive:
Event hook code will fire in addition to standard event logic

Note: All events hooks are additive, unless specified as override.

Override:
Event hook code will fire instead of the standard event logic

Sequence

Start:
Event hook code will fire before standard event logic

End:
Event hook code will fire after standard event logic

Release

The GT eForms Framework product release when the hook/part was introduced. Hooks/parts are valid after that release unless specified as deprecated.

Common API Properties and Methods

Quick Guide

eForm field data is available using the &G3FRM variable using these conventions:

  • Component G3FORM:Form &G3FRM

    • Component-scoped form object that allows access to form properties and values. This is automatically instantiated by the GT Framework when a form is started or opened.
  • &G3FRM.record("[RECORDTAG]").field("[FIELDNAME]").Value

    • Used to get or set form field values |

API Properties and Methods

G3FORM:Form

Component G3FORM:Form &G3FRM;
PropertyTypeDescription
&G3FRM.Condition StringCurrent form condition
&G3FRM.TaskStringCurrent form task
&G3FRM.FormIDStringForm id
&G3FRM.IsFluidStyleBooleanTrue if current form style is fluid, false if current form style is classic
&G3FRM.heliumBooleanTrue when the form is 3.50 Helium. Useful for branching refactored code.
MethodParameter(s)ReturnsDescription
method recordRecordTag as stringG3FORM:TAGS:RecordTagGet/Set form field values
method rowsetGridTag as stringG3FORM:TAGS:RowsetTagAccess form grids and their values
method segmentSegmentName as stringG3SEG:SegmentGet a segment to override or change display
method DPRowsetDataPoolRecord as stringG3DATA_POOL_V2:DataPoolRowsetAccess datapool data
Example Code
import G3FORM:Form;
import G3FORM:TAGS:RowsetTag;
import G3DATA_POOL_V2:DataPoolRowset;
import G3SEG:Segment;

class PAGEREC
method EFFDT_Change();
end-class;

Component G3FORM:Form &G3FRM;

method EFFDT_Change

/* property string Condition */
If &G3FRM.Condition = "Default" Then

End-If;

/* property string Task */
Evaluate &G3FRM.Task
When = "ADD"
When = "EVL"
When = "UPD"
When = "VWS"
End-Evaluate;

/* property string FormID */
Local string &formID = &G3FRM.FormID;

/* property boolean IsFluidStyle get */
If &G3FRM.IsFluidStyle Then
End-If;

/* method segment */
Local G3SEG:Segment &Segment;
&Segment = &G3FRM.segment("EmpInfo");

/* method record */
Local date &formDate = &G3FRM.record("PAGEREC").field("EFFDT").Value;

/* method rowset */
Local number &i;
Local G3FORM:TAGS:RowsetTag &formRS = &G3FRM.rowset("GRID01");
For &i = 1 To &formRS.ActiveRowCount

End-For;

/* method DPRowset */
Local G3DATA_POOL_V2:DataPoolRowset &DPRowset = &G3FRM.DPRowset("ROLES");
Local string &rolename = &DPRowset.record.ROLENAME.Value;

end-method;

G3SEG:Segment and Extended Descendants

&G3FRM.Segment("[SegmentName]");
PropertyDescription
property string name get;Gets segment name
property boolean visible;True if segment if visible, false if not
method overrideSegmentDriver() Returns G3SEG:SegmentUse this method to override the segment driver for then length of the user’s form session (so it isn’t lost between server trips)
property boolean DisplayOnlySegmentOverride get set;Use this to change interactive behavior of the form on the EVL and VWS tasks. When enabled on the EVL task, the segment will be editable by the approver. When enabled on the VWS task, the buttons and links on the form are enabled to traverse.
Note – Needs to be set before the page is painted. Recommended in the FormInit hook.

G3FORM:TAGS:RecordTag

&G3FRM.record("[RecordTag]");
PropertyDescription
Property Boolean isChangedReturns TRUE if any of the fields on the record have had their values changed since pre-population completed.
property integer fieldCount;Returns the number of FieldTags for the RecordTag
property string Task;Current form task
MethodParameter(s)ReturnsDescription
method fieldFieldName as stringG3FORM:TAGS:FieldTagUseful for getting/setting form field values
method getFieldByIndexindex as numberG3FORM:TAGS:FieldTagUseful for looping through the FieldTags
method GetChangedFields<None>Array of G3FORM:TAGS:FieldTagReturns an array of FieldTags where the array contains just the fields from the RecordTag that have had their values changed since pre-population completed.
Method RollbackChanges<None><None>Reverts all FieldTag values on the RecordTag back to their respective origValue values.
method CopyValuesFromRecordRecord as Record<None>Copies values into the RecordTag from a PeopleSoft record
method CopyValuesFromRecordTagrecTagName as string<None>Copies values into the RecordTag from another RecordTag
Example Code
import G3FORM:Form;
import G3FORM:TAGS:RecordTag;
import G3FORM:TAGS:FieldTag;

class PAGEREC
method EFFDT_Change();
end-class;

Component G3FORM:Form &G3FRM;

method EFFDT_Change

Local G3FORM:TAGS:RecordTag &PageRec = &G3FRM.record("PAGEREC");

/* method Field */
Local date &EffDt = &PageRec.field("EFFDT").Value;

/* property isChanged, methods GetChangedFields, RollbackChanges*/
If &PageRec.isChanged Then
Local array of G3FORM:TAGS:FieldTag &ChangedFields;
&ChangedFields = &PageRec.getChangedFields();
&PageRec.rollbackChanges();
End-If;

/* method CopyValuesFromRecord */
Local Record &rec = CreateRecord(Record.PERSONAL_DATA);
&rec.EMPLID.Value = "00001";
&rec.SelectByKey();
&PageRec.copyValuesFromRecord(&rec);

end-method;

G3FORM:TAGS:RowsetTag

&G3FRM.Rowset("[GridTag]");
PropertyDescription
property number ActiveRowCount get;Returns the total number of rows in the grid
property boolean isChangedIs TRUE if any data on the rowset has been changed since pre-population completed.
property boolean isEmptyReturns TRUE if there is only one row in the rowset and every field is empty (returns FALSE for All(field.Value)).
MethodParameter(s)ReturnsDescription
method rowindex as integerG3FORM:TAGS:RowTagUseful for getting/setting form field values on the RecordTag for the specified row
method insertRowRowNumber as integer<None>Inserts a row at the specified row number
method deleteRowRowNumber as integer<None>Deletes the specified row
method GetChangedRows<None>array of G3FORM:TAGS:RecordTagThe returned array contains only rows within the rowset where changes have occurred since pre-population completed.
method GetANewRow<None>G3FORM:TAGS:RowTagReturns the first row if the isEmpty() method returns TRUE, otherwise it inserts a new row at the end of the rowset and returns that row.
method RollbackChanges<None><None>This method loops through each row in the rowset and reverts all FieldTag values to their respective origValue values.
method Flush<None><None>Flushes the RowsetTag just like the PeopleSoft rowset flush method
Example Code
import G3FORM:Form;
import G3FORM:TAGS:RowsetTag;
import G3FORM:TAGS:RowTag;
import G3FORM:TAGS:RecordTag;
import G3FORM:TAGS:FieldTag;

class PAGEREC
method EFFDT_Change();
end-class;

Component G3FORM:Form &G3FRM;

method EFFDT_Change

/* property number ActiveRowCount get */
Local G3FORM:TAGS:RowsetTag &RowsetTag = &G3FRM.rowset("GRID01");
Local number &i;
For &i = 1 To &RowsetTag.ActiveRowCount
End-For;

/* method Row */
Local G3FORM:TAGS:RowTag &RowTag = &RowsetTag.row(1);
&RowTag.record("GRID01").field("EFFDT").Value = %Date;

/* method InsertRow */
&RowsetTag.insertRow(&RowsetTag.ActiveRowCount);

/* method DeleteRow */
&RowsetTag.deleteRow(1);

/* method Flush */
&RowsetTag.flush();

/* properties isEmpty, isChanged, method RollbackChanges */
Local G3FORM:TAGS:RowsetTag &PersDataRs = &G3FRM.rowset("PERS_DATA_EFFDT");
If Not &PersDataRs.isEmpty Then
If &PersDataRs.isChanged Then
Local array of G3FORM:TAGS:RecordTag &ChangedRecTags = &PersDataRs.GetChangedRows();
&PersDataRs.RollbackChanges();
End-If;
End-If;

/* method GetANewRow */
Local G3FORM:TAGS:RowsetTag &AuditRs = &G3FRM.rowset("AUDIT");
Local G3FORM:TAGS:RowTag &AuditRow = &AuditRs.getANewRow();
Local G3FORM:TAGS:RecordTag &AuditRec = &AuditRow.record("AUDIT");
&AuditRec.field("GSDATESTAMP").Value = %Date;
&AuditRec.field("GSUSER").Value = %OperatorId;

end-method;

G3FORM:TAGS:RowTag

&G3FRM.Rowset("[GridTag]").row([number])
PropertyDescription
property boolean isChanged get;Returns true if the child RecordTag has changed
property integer rowNumberRow number within the RowsetTag
MethodParameter(s)ReturnsDescription
method recordrecTagName as stringG3FORM:TAGS:RecordTagReturns the RecordTag associated with the row
Example Code
import G3FORM:Form; 
import G3FORM:TAGS:RowsetTag;
import G3FORM:TAGS:RowTag;
import G3FORM:TAGS:RecordTag;

class LogicParts
method VISIF_RowChanged(&_rowNum As integer) Returns boolean;
end-class;

Component G3FORM:Form &G3FRM;
Global any &GDBG;

method VISIF_RowChanged
/+ &_rowNum as Integer +/
/+ Returns Boolean +/
Local G3FORM:TAGS:RowsetTag &RowsetTag = &G3FRM.rowset("GRID01");
Local G3FORM:TAGS:RowTag &RowTag = &RowsetTag.row(&_rowNum);

If &RowTag.isChanged Then
Local G3FORM:TAGS:RecordTag &RecTag = &RowTag.record("GRID01");
If &RecTag.field("EMAIL").isChanged Or
&RecTag.field("PHONE").isChanged Then
&GDBG.log(&GDBG._DEBUG, "Row " | &RowTag.rowNumber | " changed");
Return True;
End-If;
End-If;

Return False;
end-method;

G3FORM:TAGS:FieldTag

&G3FRM.record("[RecordTag]").field("[FieldName]");
PropertyDescription
property any Value get set;Gets/sets the form field value.
Setting a value will propagate the change to dependent framework elements.
property boolean isChanged get;True if the form field has been changed since prepopulation; false if not
property any origValue get;Returns the form field’s original value
property string PromptSQLOverride get set;Used to provide SQL for the query instead of using the generated SQL. SQL text must be constructed with the values – binds are not supported.
Note – Needs to be set before the field is painted.
MethodParameter(s)ReturnsDescription
method setValueOnlynewValue as any<None>Set the field tag value only; do not propagate the value or fire events
method setValueSuppressEventsPropagatenewValue as any<None>Set and propagate the field tag value but do not trigger FieldEdit or FieldChange
method setValueSuppressChangePropagatenewValue as any<None>Set and propagate the field tag value, trigger FieldEdit but not FieldChange
method setValueSuppressEditPropagatenewValue as any<None>Set and propagate the field tag value, trigger FieldChange but not FieldEdit
method setValuePropagateDatanewValue as any<None>Set and propagate the field tag value but not display; trigger FieldChange and FieldEdit
method setValuePropagateDisplaynewValue as any<None>Set the field tag value and only propagate display
method setInitialValuenewValue as any<None>Set the original version using the value supplied
method getGFieldsegmentName as stringG3SEG:GFieldGet the display object for the field tag of a particular segment
method getOutputFieldsegmentName as stringFieldGet the PeopleSoft field used for display in the segment specified
method getHTMLvalue<None>StringReturns the HTML of a Rich-Text field
method getGFieldLabelsegmentName as stringStringGet the label used for the field for the specified segment
method currentValueThis allows a developer to retrieve the value of the field tag from the runtime JSON directly. Background: When you use FieldTag.value in solution code, the dependency network will calculate the corresponding node if it has not been resolved yet. This potentially triggers a series of other nodes needing to be resolved (the nodes it depends on). Use FieldTag.currentValue when you want to get the value but prevent the resolution of the dependency network.
Example Code
import G3FORM:Form;
import G3FORM:TAGS:FieldTag;

class PAGEREC
method FROM_DATE_Change();
end-class;

Component G3FORM:Form &G3FRM;

method FROM_DATE_Change

/* property any Value get set */
Local date &fromDate = &G3FRM.record("PAGEREC").field("FROM_DATE").Value;

Local date &toDate = AddToDate(&fromDate, 0, 0, 7);

Local G3FORM:TAGS:FieldTag &FieldTag;
&FieldTag = &G3FRM.record("PAGEREC").field("TO_DATE");

/* set the field tag value and propagate to anything dependent */
&FieldTag.Value = &toDate;

/* set the field tag but do not run its change or edit events */
&FieldTag.setValueSuppressEventsPropagate(&toDate);

/* property boolean isChanged get */
If &G3FRM.record("PAGEREC").field("FROM_DATE").isChanged Then

End-If;

/* property any origValue get */
Local date &orig = &G3FRM.record("PAGEREC").field("FROM_DATE").origValue;

end-method;

G3SEG:GField and G3SEG:GFieldGrid

&G3FRM.record("[RecordTag]").field("[FieldName]").getGField("[SegmentName]")
PropertyDescription
property Field OutputField;Associated PeopleSoft component buffer field
property Field OutputFieldHTML;Associated PeopleSoft component buffer field when configured as RichText/HTML
MethodParameter(s)ReturnsDescription
method isVisible

method isRowVisible
<None>

rowNum as integer
BooleanReturns true if visible
method isEditable

method isRowEditable
<None>

rowNum as integer
BooleanReturns true if the user can edit
method isRequired

method isRowRequired
<None>

rowNum as integer
BooleanReturns true if required
method Repaint

method RepaintRow
<None>

rowNum as integer
<None>Repaints the output; use with Field Paint event.
method setLabelnewLabel as string<None>Set the output label

Annotations

Annotations are introduced in release 3.50.00 and are available for forms that have Helium performance enabled. The Helium engine is more efficient because is only runs what is necessary to complete unit of work, such as painting a page or changing a field value. Therefore, elements of the framework will only run/resolve when something is dependent on it. Annotations are used to inform the framework that a solution event or part is dependent on something else in the framework. For example, a VisualIf returns true or false depending on the value of a Field Tag. To ensure the VisualIf executes when the Field Tag changes, an annotation is indicated above the VisualIf method.

Annotations are available for select events and parts; this is indicated in the document where applicable.

To indicate an annotation, use the following format:

/*@Dependency(Type="<Type>", Value="<ID>")*/

This is placed directly above the method definition. Multiple annotations may be specified on separate lines. Type defaults to "SmartSource" if omitted.

SmartSource Annotation

Use a SmartSource annotation when a hook or part is dependent on it, such as a FieldTag. This is the most common annotation.

/*@Dependency(Type="SmartSource", Value="[PAGEREC:MYFIELD]")*/

/*@Dependency(Type="SmartSource", Value="Original Oprid")*/

VisualIf Annotation

Use a VisualIf annotation when a hook or part is dependent on it. This is less commonly used. Note this is not referring to a VisualIf part, but the Visual if as defined in configuration.

/*@Dependency(Type="VisualIf", Value="558cd396-ac34-11ea-90b7-9e10487c700e")*/

RowsetTag Annotation

Use the RowsetTag annotation for hooks or parts dependent on it. A change in a RowsetTag is recognized by the adding and removing rows.

/*@Dependency(Type="RowsetTag", Value="GRID01")*/

Event Hooks

Event Hook Flow

The following graphic demonstrates some of the most common GT code hooks as they execute from left to right, top to bottom within the form lifecycle.

A screenshot of the GT Code Hook Flow

#HookRunsDescription
1Search HooksFrom the search pageAdd Search is for ADD task (creating a form)
Family/Search Set Search is for UPD, EVL, VWS tasks (existing forms)
2AddSearchInitWhen opening search pageRuns before triggering default search init behavior
3AddSearchKeySetWhen opening search pageRuns before triggering default search key set behavior
4AddRunSearchWhen opening search pageRuns before triggering default run search behavior
5AddSearchSaveHookClosing search pageRuns just before the search page closes
6FormInitWhen form opensLike component PreBuild. Use for form initialization.
7PaintWith each changeFor updating page display with each data change.
8PostNavAfter arrival/displayLike PageActivate. Use for styling by setting field visibility, labels, etc.
9[FIELDNAME]_EditAfter changing valueLike FieldEdit. Validate a field value here.
10[FIELDNAME]_ChangeAfter changing valueLike FieldChange. Set dependent values here.
11InsertRowAfter a row is insertedLike InsertRow, initialize or calculate values here.
12DeleteRowBefore a row is deletedLike DeleteRow, update calculations or prevent deletion
13PreNavBefore leaving pageFor page field data validation. Throw an error here to prevent page navigation as needed.
14SavePreChangeBefore saving/submittingLike SaveEdit and SavePreChange, run edits before saving a form
15AWE Workflow HooksAfter form action button clickRuns when AWE event handler calls the named method.
16GT Form ActionsAfter form action button clickForm actions run after AWE actions and before default action behavior.
17OnNotifyAfter submitting formInstantiate component interfaces and set their values here.

Registered Hooks

Generic Hooks

Generic Hooks allow you to add code to any field in the form without effecting the dependency network and without triggering an app server trip every time. This allows the user to have the full benefits of deferred mode, but still be able to trigger code on an event the next time an App Server trip occurs.

Common use cases would include, but are not limited to:

  • Forcing action items to reset every time any field is changed without having to set up a dependency on the field in the action item visual if.
  • Auditing field changes
RegisteredHooks
  • Form Application Class Paths:
    • [Form Application Package]:FormEvents:FormEvents
    • Recommended: [Form Application Package]:RegisteredHooks
  • Method:
    • FormEvents: method FormInit()
      • &G3FRM.registerHook must be called in FormInit.
    • Recommended: RegisteredHooks: method [MethodName](&_triggerNodeId As String);
  • Register: Automatic
  • Release: 3.58.02
  • Notes:
    • Pattern to Call registerHook in FormInit:
      • &G3FRM.registerHook("[TRIGGER]", "[FORM APP PACKAGE]:[APPLICATION CLASS CONTAINING METHOD]", "[METHOD in APP CLASS TO CALL]", "[E for Exclude, I for Include]");
    • Parameters:
      • TRIGGER
        • The trigger can be set to a field tag or a record tag.
        • If it is a grid record tag, the referenced code will fire on row insert/delete as well
      • LOCATION OF CODE
        • The middle two parameters are the Form App Package: App Class and the method within that class
        • It is recommended to put the code called from the generic hook in a RegisteredHooks class in the form application package, although it can call code from anywhere.
      • INCLUDE or EXCLUDE:
        • The final parameter is connected to the trigger. It indicates whether the code should fire when the trigger changes (‘I’ - Include) or if it should fire for any related node on the form except the trigger (‘E’ - exclude).
        • You can stack ‘E’s on the same code and ‘I’s on the same code, but you cannot do a combination of ‘E’/’I’ rules on the same code object
Example Code: [Form Application Package]:FormEvents:FormEvents
import G3FORM:Form;

class FormEvents
method FormInit();
end-class;

Component G3FORM:Form &G3FRM;

method FormInit

rem &_nodeID As string, &_fullAppPackagePath As string, &_method As string, &_mode As string;

rem calls the specified code for every field on PAGEREC;
&G3FRM.registerHook("PAGEREC.NAME", "G_FORM_CAB_TEST1:RegisteredHooks", "ResetActionItems", "I");
rem &G3FRM.registerHook("PAGEREC.NAME", "G_FORM_CAB_TEST1:RegisteredHooks", "ResetActionItems", "I");

rem calls the specified code for every field on GRID01 + insert/delete rows;
&G3FRM.registerHook("GRID01", "G_FORM_CAB_TEST1:RegisteredHooks", "ResetActionItems", "I");

rem calls the specified code for every field except PAGEREC.NAME;
&G3FRM.registerHook("PAGEREC.NAME", "G_FORM_CAB_TEST1:RegisteredHooks", "OutputMessage", "E");

end-method;
Example Code: [Form Application Package]:RegisteredHooks
import G3FORM:Form;
import G3UTILITIES:Constants;

class RegisteredHooks
method ResetActionItems(&_triggerNodeId As string);
method OutputMessage(&_triggerNodeId As string);
end-class;

Component G3UTILITIES:Constants &GCON;
Component G3FORM:Form &G3FRM;

method ResetActionItems
/+ &_triggerNodeId as String +/
&G3FRM.segment(&GCON.GTACTIONITEMS).ResetAcks();
end-method;

method OutputMessage
/+ &_triggerNodeId as String +/

If Find("GRID01", &_triggerNodeId) > 0 Then
MessageBox(0, "", 0, 0, "I was changed since the last server trip:" | &_triggerNodeId | " on row " | CurrentRowNumber());
Else
MessageBox(0, "", 0, 0, "I was changed since the last server trip:" | &_triggerNodeId);
End-If;

end-method;

Search Events

Search Events

Search events fire when the user is on a Search page. Search event hook PeopleCode can be placed in the Form, Family, SearchSet or System application package based on how broadly it needs to be fired. Only the most granular search event will be fired, i.e. a search event hook in a System application package will only fire if there is not an overriding search event hook in a Family, SearchSet event, or Form application package.

NOTE

Search events on an Add search page will only fire if a search record is configured on the add task for the form type:

Navigation: Manage GT eForms 3.x > Form Setup > [Search for appropriate form type] > Data (tab) > Search Settings

A screenshot of the Search Settings section expanded on the Data tab of Form Setup

Add Search Events

AddSearchKeySet
  • Form Application Class Path: [Form Application Package]:SearchEvents
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method AddSearchKeySet(&_Search as G3SEARCH:Search);
  • Test: Open the add search page.
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method AddSearchKeySet(&_Search As G3SEARCH:Search);
end-class;

method AddSearchKeySet
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "AddSearchKeySet triggered.");
end-method;
AddSearchInit
  • Form Application Class Path: [Form Application Package]:SearchEvents
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method AddSearchInit(&_Search as G3SEARCH:Search);
  • Test: Open the add search page.
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method AddSearchInit(&_Search As G3SEARCH:Search);
end-class;

method AddSearchInit
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "AddSearchInit triggered.");
end-method;
AddSearchReloadInit
  • Form Application Class Path: [Form Application Package]:SearchEvents
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method AddSearchReloadInit(&_Search as G3SEARCH:Search);
  • Test: Click the Return to Search button in the form.
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method AddSearchReloadInit(&_Search As G3SEARCH:Search);
end-class;

method AddSearchReloadInit
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "AddSearchReloadInit triggered.");
end-method;
AddSearchReloadStyle
  • Form Application Class Path: [Form Application Package]:SearchEvents
  • Family, SearchSet, or System Application Class Path: Application Package]:SearchEvents
  • Method: method AddSearchReloadStyle(&_Search as G3SEARCH:Search);
  • Test: Click the Return to Search button in the form.
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method AddSearchReloadStyle(&_Search As G3SEARCH:Search);
end-class;

method AddSearchReloadStyle
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "AddSearchReloadStyle triggered.");
end-method;
AddSearchSort
  • Form Application Class Path: [Form Application Package]:SearchEvents
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method AddSearchSort(&_Search as G3SEARCH:Search);
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method AddSearchSort(&_Search As G3SEARCH:Search);
end-class;

method AddSearchSort
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "AddSearchSort triggered.");
end-method;
AddSearchSaveHook
  • Form Application Class Path: [Form Application Package]:SearchEvents
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method AddSearchSaveHook(&_Search as G3SEARCH:Search);
  • Test: Select a search result on the Search page.
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method AddSearchSaveHook(&_Search As G3SEARCH:Search);
end-class;

method AddSearchSaveHook
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "AddSearchSaveHook triggered.");
end-method;
AddSearchStyle
  • Form Application Class Path: [Form Application Package]:SearchEvents
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method AddSearchStyle(&_Search as G3SEARCH:Search);
  • Test: Open the add search page.
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method AddSearchStyle(&_Search As G3SEARCH:Search);
end-class;

method AddSearchStyle
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "AddSearchStyle triggered.");
end-method;
AddRunSearch
  • Form Application Class Path: [Form Application Package]:SearchEvents
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method AddRunSearch(&_Search as G3SEARCH:Search);
  • Test: Click the Search button on the add search page.
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method AddRunSearch(&_Search As G3SEARCH:Search);
end-class;

method AddRunSearch
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "AddRunSearch triggered.");
end-method;

Update, Evaluate, and View Search Events

FormRunSearch
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method FormRunSearch(&_Search as G3SEARCH:Search);
  • Test: Click the Search button on the family update, evaluate, or view search page.
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method FormRunSearch(&_Search As G3SEARCH:Search);
end-class;

Method FormRunSearch
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "FormRunSearch triggered.");
end-method;
FormSearchKeySet
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method FormSearchKeySet(&_Search as G3SEARCH:Search);
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method FormSearchKeySet(&_Search As G3SEARCH:Search);
end-class;

method FormSearchKeySet
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "FormSearchKeySet triggered.");
end-method;
FormSearchInit
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method FormSearchInit(&_Search as G3SEARCH:Search);
  • Test: This may be tested by choosing the Update, Evaluate, or View option from the WorkCenter:
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method FormSearchInit(&_Search As G3SEARCH:Search);
end-class;

method FormSearchInit
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "FormSearchInit triggered.");
end-method;
FormSearchReloadInit
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method FormSearchReloadInit(&_Search as G3SEARCH:Search);
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method FormSearchReloadInit(&_Search As G3SEARCH:Search);
end-class;

method FormSearchReloadInit
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "FormSearchReloadInit triggered.");
end-method;
FormSearchReloadStyle
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method FormSearchReloadStyle(&_Search as G3SEARCH:Search);
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method FormSearchReloadStyle(&_Search As G3SEARCH:Search);
end-class;

method FormSearchReloadStyle
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "FormSearchReloadStyle triggered.");
end-method;
FormSearchSort
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method FormSearchSort(&_Search as G3SEARCH:Search);
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method FormSearchSort(&_Search As G3SEARCH:Search);
end-class;

method FormSearchSort
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "FormSearchSort triggered.");
end-method;
FormSearchSaveHook
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method FormSearchSaveHook(&_Search as G3SEARCH:Search);
  • Test: Select a search result on the Search page.
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method FormSearchSaveHook(&_Search As G3SEARCH:Search);
end-class;

method FormSearchSaveHook
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "FormSearchSaveHook triggered.");
end-method;
FormSearchStyle
  • Family, SearchSet, or System Application Class Path: [Application Package]:SearchEvents
  • Method: method FormSearchStyle(&_Search as G3SEARCH:Search);
  • Test: Open a family search page (open a form to Update, Evaluate, or View).
  • Register: Automatic
  • Release: 3.30.03
Example Code
import G3SEARCH:Search; 

class SearchEvents
method FormSearchStyle(&_Search As G3SEARCH:Search);
end-class;

method FormSearchStyle
/+ &_Search as G3SEARCH:Search +/
MessageBox(0, "", 0, 0, "FormSearchStyle triggered.");
end-method;
LandingPagePostBuild
  • SearchSet Class Path: [Application Package]:SearchSetEvents
  • System Application Class Path: [Application Package]:SystemEvents
  • Method: method LandingPagePostBuild(&pageHTMLField As Field);
  • Test: Open a search set or system landing page and check landing page HTML area.
  • Release: 3.3
Example Code
import G3SEARCH:Search; 

class SearchSetEvents
method LandingPagePostBuild(&pageHTMLField As Field);
end-class;

method LandingPagePostBuild
/+ &pageHTMLField as Field +/
MessageBox(0, "", 0, 0, "LandingPagePostBuild triggered.");
&pageHTMLField.Value = "<p>Landing Page HTML area text</p>";
end-method;

Form Events

Field Events

FieldChange
  • Override: Additive
  • Path: [Form Application Package]:FieldEvents:[RECORDTAG]
  • Method:
    • Column Segment Fields: method [FIELDNAME]_Change();
    • Grid Segment Fields: method [FIELDNAME]_Change(&_rowTag As G3FORM:TAGS:RowTag);
  • Annotations: No
  • Register: Form Type Build
  • Release: 3.10.01
Example Code - Column Field
class PAGEREC 
method OPRID_Change();
end-class;

method OPRID_Change
MessageBox(0, "", 0, 0, "Field change triggered for the OPRID field.");
end-method;
Example Code - Grid Field
class GRID01 
method ROLENAME_Change(&_rowTag As G3FORM:TAGS:RowTag);
end-class;

method ROLENAME_Change
/+ &_rowTag as G3FORM:TAGS:RowTag +/
Local integer &rowNum = &_rowTag.rowNumber;
Local string &role = &_rowTag.record("ROLEUSER").field("ROLENAME").Value;
end-method;
FieldEdit
  • Override: Additive
  • Path: [Form Application Package]:FieldEvents:[RECORDTAG]
  • Method:
    • Column Segment Fields: method [FIELDNAME]_Edit();
    • Grid Segment Fields: method [FIELDNAME]_Edit(&_rowTag As G3FORM:TAGS:RowTag);
  • Annotations: No
  • Register: Form Type Build
  • Release:
    • 3.10.01
    • 3.50.00: Grid Segment Fields
    • 3.58.00: Highly recommend using a ValidationEvent instead of this hook going forward. FieldEdit just fires when leaving a field. A ValidationEvent can be coded once and then annotated to fire both when a field changes and when leaving a page with that field. FieldEdit still fires for backwards compatibility.
Example Code - Column Field
class PAGEREC
method OPRID_Edit();
end-class;

method OPRID_Edit
MessageBox(0, "", 0, 0, "Field edit triggered for the OPRID field.");
end-method;
Example Code - Grid Field
class GRID01
method ROLENAME_Edit(&_rowTag As G3FORM:TAGS:RowTag);
end-class;

method ROLENAME_Edit
/+ &_rowTag as G3FORM:TAGS:RowTag +/
Local integer &rowNum = &_rowTag.rowNumber;
Local string &role = &_rowTag.record("ROLEUSER").field("ROLENAME").Value;
end-method;
Field SetSortDropDownList
  • Override: Additive
  • Path: [Form Application Package]:FieldEvents:[RECORDTAG]
  • Method:
    • Column Segment Fields: method [FIELDNAME]_SetSortDropDownList(&dd As G3LOOKUP_V2:Structure:DropDownOptionsList)
    • Grid Segment Fields: method [FIELDNAME]_SetSortDropDownList(&_rowNum as Integer, &dd As G3LOOKUP_V2:Structure:DropDownOptionsList)
  • Annotations: Yes
  • Register: Form Type Build
  • Release: 3.50.00
Example Code
import G3LOOKUP_V2:Structure:DropDownOptionsList;
import G3FORM:Form;

class PAGEREC
method GSCOND_SetSortDropDownList(&dd As G3LOOKUP_V2:Structure:DropDownOptionsList);
end-class;

Component G3FORM:Form &G3FRM;

method GSCOND_SetSortDropDownList
/+ &dd as G3LOOKUP_V2:Structure:DropDownOptionsList +/

&dd.addOption("N", "New");
&dd.addOption("U", "Used");

&dd.displayListInOrder = False;
end-method
Field FormError
  • Override: Additive
  • Path: [Form Application Package]:ValidationEvents
  • Method: method [LogicDescription]_Validation();
  • Annotations: Yes
  • Register: Form Type Build
  • Release: For the validation to display, call the error as follows within the method:
If [condition] then
[field].formError([ERROR TEXT]);

Example Code - Column Field
import G3FORM:Form;

class ValidationEvents
method ValidationEvents();
method checkStartYear_Validation();
End-class;

Component G3FORM:Form &G3FRM;

/*@Trigger(Type="SmartSource", Value="[PAGEREC:START_DT]")*/
method checkStartYear_Validation

Local date &startDate = %This.startDateTag.Value;

If All(&startDate) And
Year(&startDate) < 2001 Then
Local string &errorText = "Year has to be this millenia";
%This.startDateTag.formError(&errorText);
End-If;

end-method;
Example Code - Grid Field
import G3FORM:Form;

class ValidationEvents
method ValidationEvents();
method checkPetNickName_Validation ();
End-class;

Component G3FORM:Form &G3FRM;

/*@Trigger(Type="SmartSource", Value="[GRID01:GSPET_NAME]")*/
/*@Trigger(Type="SmartSource", Value="[GRID01:NICK_NAME]")*/
method checkPetNickName_Validation
/+ &_rowTag as G3FORM:TAGS:RowTag +/

Local G3FORM:TAGS:FieldTag &nameTag = &_rowTag.record("GRID01").field("GSPET_NAME");
Local G3FORM:TAGS:FieldTag &nickNameTag = &_rowTag.record("GRID01").field("NICK_NAME");

If &nickNameTag.Value = &nameTag.Value Then
&nickNameTag.formError("Nickname should be different");
End-If;

end-method;

Rowset Events

InsertRow
  • Override: Additive
  • Path: [Form Application Package]:RowsetEvents:[Rowset Tag Name]
  • Method: method InsertRow(&_rowTag As G3FORM:TAGS:RowTag);
  • Annotations: No
  • Register: Form Type Build
  • Release: 3.50.00
Example Code
class GRID02
method InsertRow(&_rowTag As G3FORM:TAGS:RowTag);
end-class;

method InsertRow
/+ &_rowTag As G3FORM:TAGS:RowTag +/

&_rowTag.record("GRID02").field("STATUS").value = "A";

end-method;
DeleteRow
  • Override: Additive
  • Path: [Form Application Package]:RowsetEvents:[Rowset Tag Name]
  • Method: method DeleteRow(&_rowTag As G3FORM:TAGS:RowTag);
  • Annotations: No
  • Register: Form Type Build
  • Release: 3.50.00
Example Code
class GRID02
method DeleteRow(&_rowTag As G3FORM:TAGS:RowTag);
end-class;

method DeleteRow
/+ &_rowTag As G3FORM:TAGS:RowTag +/

Local number &amt = &_rowTag.record("GRID02").field("AMT").value;

end-method;

Form Events

FormInit
  • Override: Additive
  • Path: [Form Application Package]:FormEvents:FormEvents
  • Method: method FormInit();
  • Annotations: No
  • Register: Automatic
  • Release: 3.10.04
Example Code
class FormEvents
method FormInit();
end-class;

method FormInit
MessageBox (0, "",0,0, "FormInit");
end-method;
FormInitPropagate
  • Override: Additive
  • Path: [Form Application Package]:FormEvents:FormEvents
  • Method: method FormInitPropagate ();
  • Annotations: No
  • Register: Automatic
  • Release: 3.58.01
Example Code
class FormEvents
method FormInitPropagate ();
end-class;

method FormInitPropagate
If &G3FRM.Task = ""ADD"" Then
&G3FRM.record("PAGEREC").field("G3FIELD").setValuePropagateData("GT”);
End-If;
end-method;
SavePreChange
  • Override: Additive
  • Path: [Form Application Package]:FormEvents:FormEvents
  • Method:
    • method SavePreChange();
    • method SavePreChangeHook() - deprecated
  • Annotations: No
  • Register: Form Type Build
  • Release: 3.10.02
Example Code
class FormEvents
method SavePreChange();
end-class;

method SavePreChange
MessageBox(0, "", 0, 0, "SavePreChange triggered.");
end-method;
SavePostChange
  • Override: Additive
  • Path: [Form Application Package]:FormEvents:FormEvents
  • Method:
    • method SavePostChange();
    • method SavePostChangeHook();
  • Annotations: No
  • Register: Automatic
  • Release: 3.3
  • Notes: SavePostChange available in 3.58.03
Example Code
class FormEvents 
method SavePostChange();
end-class;

method SavePostChange
MessageBox(0, "", 0, 0, "SavePostChange triggered.");
end-method;
SearchKeySaveHook
  • Override: Additive
  • Path: [Form Application Package]:FormEvents:FormEvents
  • Method: method SearchKeySaveHook();
  • Annotations: No
  • Register: Automatic
  • Release: 3.10.02
  • Notes: In 3.50 Helium, use &G3FRM.FormKeyRowset.FieldTagToFormKey() to include a form field as a search key.
Example Code
class FormEvents
method SearchKeySaveHook();
end-class;

method SearchKeySaveHook
MessageBox(0, "", 0, 0, "SearchKeySaveHook triggered.");
end-method;
AdminToolRefresh
  • Override: Additive
  • Path: [Form Application Package]:FormEvents:FormEvents
  • Method: method AdminToolRefresh(&_adminTool As G3ADMIN:AdminTool);
  • Release: 3.3
Example Code
import G3ADMIN:AdminTool; 

class FormEvents
method AdminToolRefresh(&_adminTool As G3ADMIN:AdminTool);
end-class;

method AdminToolRefresh
/+ &_adminTool as G3ADMIN:AdminTool +/
MessageBox(0, "", 0, 0, "AdminToolRefresh triggered.");
end-method;

Page Events

Page Paint
  • Override: Additive
  • Path: [Form Application Package]:PageEvents
  • Method: method Paint$[Condition]$[Action]$[Page Number]();
  • Annotations: Yes
  • Register: Form Type Build
  • Release: 3.50.00
Example Code
class PageEvents
method Paint$Default$EVL$1();
end-class;

method Paint$Default$EVL$1()
MessageBox(0, "", 0, 0, "Paint triggered.");
end-method;
Page PostNav
  • Override: Additive
  • Path: [Form Application Package]:PageEvents
  • Method: method PostNav$[Condition]$[Action]$[Page Number]();
  • Annotations: No
  • Register: Form Type Build
  • Release: 3.50.00
Example Code
class PageEvents
method PostNav$Default$ADD$2();
end-class;

method PostNav$Default$ADD$2()
MessageBox(0, "", 0, 0, "PostNav triggered.");
end-method;
Page PreNav
  • Override: Additive
  • Path: [Form Application Package]:PageEvents
  • Method: method PreNav$[Condition]$[Action]$[Page Number]();
  • Annotations: No
  • Register: Form Type Build
  • Release: 3.50.00
Example Code
class PageEvents
method PreNav$Default$UPD$3();
end-class;

method PreNav$Default$UPD$3()
MessageBox(0, "", 0, 0, "PreNav triggered.");
end-method;

Segment Events

Do not override the name property in delivered segment driver override classes (such as those for attachments, buttons, comments, etc.) Earlier versions of the GT eForms Framework required this override; the current version of the framework prohibits it.

However, the GetSubpage() method may be overridden.

Paint
  • Override: Additive
  • Path: [Form Application Package]:SegmentEvents:[SegmentName]
  • Method: method Paint();
  • Annotations: Yes
  • Register: Form Type Build
  • Release: 3.10.01
Example Code
class SegmentName
method Paint();
end-class;

method Paint
MessageBox(0, "", 0, 0, "Paint triggered.");
end-method;
PostNav
  • Override: Additive
  • Path: [Form Application Package]:SegmentEvents:[SegmentName]
  • Method: method PostNav();
  • Annotations: No
  • Register: Form Type Build
  • Release: 3.10.01
Example Code
class SegmentName
method PostNav();
end-class;

Component G3FORM:Form &G3FRM;

method PostNav
If (&G3FRM.Task = "EVL") Then
MessageBox(0, "", 0, 0, "PostNav triggered.");
End-If;
end-method;
PreNav
  • Override: Additive
  • Path: [Form Application Package]:SegmentEvents:[SegmentName]
  • Method: Method PreNav();
  • Annotations: No
  • Register: Form Type Build
  • Release: 3.10.01
Example Code
class SegmentName
method PreNav();
end-class;

method PreNav
Error("PreNav triggered.");
end-method;
PaintField
  • Override: Additive
  • Path: [Form Application Package]:SegmentEvents:[SegmentName]
  • Method: Method PaintField$[Field Name]();
  • Annotations: Yes
  • Register: Form Type Build
  • Release: 3.50.00
Example Code
class MySegment
method PaintField$GSFIELD();
end-class;

method PaintField$GSFIELD

Local G3SEG:GField &GField;
&GField = &G3FRM.record("PAGEREC").field("G3FIELD").getGField("MySegment");

&GField.OutputField.Visible = False;

&GField.Repaint();

end-method;
DeleteRowHook
  • Override: Additive
  • Path: [Form Application Package]:SegmentEvents:[SegmentName]
  • Method: method DeleteRowHook();
  • Annotations: No
  • Register: Automatic
  • Release:
    • 3.10.02
    • Deprecated in 3.50 Helium; use DeleteRow instead
Example Code
class GridSeg1
method DeleteRowHook();
end-class;

method DeleteRowHook
MessageBox(0, "", 0, 0, "DeleteRowHook triggered.");
end-method;
InsertRowHook
  • Override: Additive
  • Path: [Form Application Package]:SegmentEvents:[SegmentName]
  • Method: method InsertRowHook();
  • Annotations: No
  • Register: Automatic
  • Release:
    • 3.3
    • Deprecated in 3.50 Helium; use InsertRow instead.
Example Code
class GridSeg1 
method InsertRowHook();
end-class;

method InsertRowHook
MessageBox(0, "", 0, 0, "InsertRowHook triggered.");
end-method;

Segment Drivers

Solution Custom Segment Driver
  • Override: Additive (New Solution Custom Segment) or Override (GT Delivered Custom Segments)
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3SEG:Segment
  • Constructor: method [Class Name](&_Form as G3FORM:Form);
  • Register: Form Type Build
  • Release: 3.10.01
MethodParameter(s)ReturnsDescriptionRelease
method GetSubPage();<None><None>Required – return the name of the Custom Segment subpage3.10.01
Example Code
import G3SEG:Segment;
import G3FORM:Form;

class G3HOOK1_SBP extends G3SEG:Segment
method G3HOOK1_SBP(&_Form As G3FORM:Form);
method GetSubpage() Returns string;
end-class;

method G3HOOK1_SBP
/+ &_Form as G3FORM:Form +/
%Super = create G3SEG:Segment(&_Form);
end-method;

method GetSubpage
/+ Returns String +/
/+ Extends/implements G3SEG:Segment.GetSubpage +/
Return "G3HOOK1_SBP";
end-method;
MethodParameter(s)ReturnsDescriptionRelease
method Validate();<None><None>Optional – fires when leaving a page with the Custom Segment on it3.58.01
Note: To display the error message in the custom segment, use this method:
%This.segmentError("[Segment name]", "[ERROR TEXT]");
Example Code
import G3CUSTOM_SEGMENTS:Fluid:Comments;
import G3FORM:Form;

class Comments extends G3CUSTOM_SEGMENTS:Fluid:Comments
method Comments(&_Form As G3FORM:Form);
method Validate();
end-class;

Component G3FORM:Form &G3FRM;

method Comments
/+ &_Form as G3FORM:Form +/
/+ Extends/implements G3CUSTOM_SEGMENTS:Fluid:Comments.Comments +/
%Super = create G3CUSTOM_SEGMENTS:Fluid:Comments(&_Form);
end-method;

method Validate
/+ Extends/implements G3CUSTOM_SEGMENTS:Classic:Comments.Validate +/

Local Record &recComments = GetLevel0()(1).G3COMMENTS_DRV;
Local string &errorMessage;
If Len(&recComments.G3THIS_COMMENT.Value) < 6 Then
&errorMessage = "Enter at least 6 characters for form comments";
%This.segmentError(&errorMessage);
End-If;
If Len(&recComments.G3THIS_COMMENT.Value) < 10 Then
&errorMessage = "Enter at least 10 characters for form comments";
%This.segmentError(&errorMessage);
End-If;
end-method;

GT Delivered Custom Segment Driver Override

ActionItems Segment Override
  • Override: Override
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3CUSTOM_SEGMENTS:Classic|Fluid:ActionItems
  • Constructor: method [Class Name](&_Form as G3FORM:Form);
  • Register: Form Type Build
  • Release: 3.1
Example Code
import G3CUSTOM_SEGMENTS:Classic:ActionItems;
import G3FORM:Form;

class ActionItems extends G3CUSTOM_SEGMENTS:Classic:ActionItems
method ActionItems(&_Form As G3FORM:Form);
end-class;

method ActionItems
/+ &_Form as G3FORM:Form +/
/+ Extends/implements G3CUSTOM_SEGMENTS:Classic:ActionItems.ActionItems +/
%Super = create G3CUSTOM_SEGMENTS:Classic:ActionItems(&_Form);
end-method;
ActionItemsLog Segment Override
  • Override: Override
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3CUSTOM_SEGMENTS:Classic|Fluid:ActionItemsLog
  • Constructor: method [Class Name](&_Form as G3FORM:Form);
  • Register: Form Type Build
  • Release: 3.1
Example Code
import G3CUSTOM_SEGMENTS:Classic:ActionItemsLog;
import G3FORM:Form;

class ActionItemsLog extends G3CUSTOM_SEGMENTS:Classic:ActionItemsLog
method ActionItemsLog(&_Form As G3FORM:Form);
end-class;

method ActionItemsLog
/+ &_Form as G3FORM:Form +/
/+ Extends/implements G3CUSTOM_SEGMENTS:Classic:ActionItemsLog.ActionItemsLog +/
%Super = create G3CUSTOM_SEGMENTS:Classic:ActionItemsLog(&_Form);
end-method;
Attachment Segment Override
  • Override: Override
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3CUSTOM_SEGMENTS:Fluid:Attachments
  • Constructor: method [Class Name](&_Form as G3FORM:Form);
  • Register: Form Type Build
  • Release: 3.1
Example Code
import G3CUSTOM_SEGMENTS:Classic:Attachments;
import G3FORM:Form;

class Attachments extends G3CUSTOM_SEGMENTS:Classic:Attachments
method Attachments(&_Form As G3FORM:Form);
end-class;

method Attachments
/+ &_Form as G3FORM:Form +/
/+ Extends/implements G3CUSTOM_SEGMENTS:Classic:Attachments.Attachments +/
%Super = create G3CUSTOM_SEGMENTS:Classic:Attachments(&_Form);
end-method;
Comment Segment Override
  • Override: Override
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3CUSTOM_SEGMENTS:Classic|Fluid:Comments
  • Method: method [Class Name](&_Form as G3FORM:Form);
  • Register: Form Type Build
  • Release: 3.1
Example Code
import G3CUSTOM_SEGMENTS:Classic:Comments;
import G3FORM:Form;

class Comments extends G3CUSTOM_SEGMENTS:Classic:Comments
method Comments(&_Form As G3FORM:Form);
end-class;

method Comments
/+ &_Form as G3FORM:Form +/
/+ Extends/implements G3CUSTOM_SEGMENTS:Classic:Comments.Comments +/
%Super = create G3CUSTOM_SEGMENTS:Classic:Comments(&_Form);
end-method;
FormLog Segment Override
  • Override: Override
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3CUSTOM_SEGMENTS:Fluid:FormLog
  • Method: method [Class Name](&_Form as G3FORM:Form);
  • Register: Form Type Build
  • Release: 3.1
Example Code
import G3CUSTOM_SEGMENTS:Classic:FormLog;
import G3FORM:Form;

class FormLog extends G3CUSTOM_SEGMENTS:Classic:FormLog
method FormLog(&_Form As G3FORM:Form);
end-class;

method FormLog
/+ &_Form as G3FORM:Form +/
/+ Extends/implements G3CUSTOM_SEGMENTS:Classic:FormLog.FormLog +/
%Super = create G3CUSTOM_SEGMENTS:Classic:FormLog(&_Form);
end-method;
  • Override: Override
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3CUSTOM_SEGMENTS:Fluid:HelpLink
  • Method: method [Class Name](&_Form as G3FORM:Form);
  • Register: From Type Build
  • Release: 3.1
Example Code
import G3CUSTOM_SEGMENTS:Classic:HelpLink;
import G3FORM:Form;

class HelpLink extends G3CUSTOM_SEGMENTS:Classic:HelpLink
method HelpLink(&_Form As G3FORM:Form);
end-class;

method HelpLink
/+ &_Form as G3FORM:Form +/
/+ Extends/implements G3CUSTOM_SEGMENTS:Classic:HelpLink.HelpLink +/
%Super = create G3CUSTOM_SEGMENTS:Classic:HelpLink(&_Form);
end-method;
  • Override: Override
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3BUTTONS:[ButtonClassToOverride]
  • Method:
    method [ButtonClassToOverride](&_ButtonSegment as 
    G3CUSTOM_SEGMENTS:Classic:NavigationButtons);
    method Click();
    method Paint();
  • Register: Add instance of this class in button segment override class’s button list.
  • Release: 3.10.01
  • Notes: Version 3.58 of GT eForms allows form builders to change button labels and button display (visible/disabled) using configuration, which is the recommended method. However, coding a custom segment driver override is still required to change what actually happens when the user clicks a button.
Example Code
import G3BUTTONS:NextButton;
import G3CUSTOM_SEGMENTS:Classic:NavigationButtons;

class NextButton extends G3BUTTONS:NextButton;
method NextButton(&_Segment As G3CUSTOM_SEGMENTS:Classic:NavigationButtons);
method Click();
end-class;

method NextButton
/+ &_Segment as G3CUSTOM_SEGMENTS:Classic:NavigationButtons +/
/+ Extends/implements G3BUTTONS:NextButton.NextButton +/
%Super = create G3BUTTONS:NextButton(&_Segment);
end-method;

method Click
/+ Extends/implements G3BUTTONS:NextButton.Click +/
%Super.Click();
MessageBox(0, "", 0, 0, "NextButton Click triggered.");
end-method;
  • Override: Override
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3CUSTOM_SEGMENTS:Classic|Fluid:NavigationButtons
  • Method: method [Class Name](&_Form as G3FORM:Form);
  • Register: Form Type Build
  • Release: 3.1
  • Notes: Version 3.58 of GT eForms allows form builders to change button labels and button display (visible/disabled) using configuration, which is the recommended method. However, Coding a custom segment driver override is still required to change what actually happens when the user clicks a button.
Example Code
import G3CUSTOM_SEGMENTS:Classic:NavigationButtons;
import G3FORM:Form;

class NavButton extends G3CUSTOM_SEGMENTS:Classic:NavigationButtons
method NavButton(&_Form As G3FORM:Form);
method Paint();
end-class;

method NavButton
/+ &_Form as G3FORM:Form +/
%Super = create G3CUSTOM_SEGMENTS:Classic:NavigationButtons(&_Form)

If Not (&_Form = Null) Then
Local G_FORM_HOOK:SegmentDriverOverride:NextButton &nextBTN = create G_FORM_HOOK:SegmentDriverOverride:NextButton(%This);
%This.buttonList.Put("NEXT", &nextBTN);
End-If;

end-method;

method Paint
/+ Extends/implements G3CUSTOM_SEGMENTS:Classic:NavigationButtons.Paint +/
%Super.Paint();
MessageBox(0, "", 0, 0, "NextButton Paint triggered.");
end-method;
PrintButton Segment Override
  • Override: Override
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3CUSTOM_SEGMENTS:Fluid:PrintButton
  • Method: method [Class Name](&_Form as G3FORM:Form);
  • Register: Form Type Build
  • Release: 3.1
  • Notes: Version 3.58 of GT eForms allows form builders to change button labels and button display (visible/disabled) using configuration, which is the recommended method. However, Coding a custom segment driver override is still required to change what actually happens when the user clicks a button.
Example Code
import G3CUSTOM_SEGMENTS:Classic:PrintButton;
import G3FORM:Form;

class PrintButton extends G3CUSTOM_SEGMENTS:Classic:PrintButton
method PrintButton(&_Form As G3FORM:Form);
end-class;

method PrintButton
/+ &_Form as G3FORM:Form +/
/+ Extends/implements G3CUSTOM_SEGMENTS:Classic:PrintButton.PrintButton +/
%Super = create G3CUSTOM_SEGMENTS:Classic:PrintButton(&_Form);
end-method;
Visualizer Segment Override
  • Override: Override
  • Path: <Any Application Package>:<Any Subpackage>:<Any Class>
  • Extends: G3CUSTOM_SEGMENTS:Fluid:AweVisualizer
  • Method: method [Class Name](&_Form as G3FORM:Form);
  • Register: Form Type Build
  • Release: 3.1
Example Code
import G3CUSTOM_SEGMENTS:Classic:AweVisualizer;
import G3FORM:Form;

class AweVisualizer extends G3CUSTOM_SEGMENTS:Classic:AweVisualizer
method AweVisualizer(&_Form As G3FORM:Form);
end-class;

method AweVisualizer
/+ &_Form as G3FORM:Form +/
/+ Extends/implements G3CUSTOM_SEGMENTS:Classic:AweVisualizer.AweVisualizer +/
%Super = create G3CUSTOM_SEGMENTS:Classic:AweVisualizer(&_Form);
end-method;

Validation Events

Segment-level Validations (when leaving a page)
  • Override: Additive
  • Path: [Form Application Package]:ValidationEvents
  • Method: method [LogicDescription]_Validation();
  • Annotations: /@Trigger(Type="Segment", Value="[Segment Name])/
  • Register: Form Type Build
  • Release: 3.58.00 Helium
Note: For the validation to display, call the error as follows within the method:
If [condition] then
&G3FRM.segmentError([Segment name],[ERROR TEXT]);

Example Code
import G3FORM:Form;

class ValidationEvents
method ValidationEvents();
method checkForHoliday_Validation();
End-class;

Component G3FORM:Form &G3FRM;

/*@Trigger(Type="Segment", Value="RW_Edit1_29")*/
method checkForHoliday_Validation
Local date &startDate = %This.startDateTag.Value;
Local date &endDate = %This.endDateTag.Value;

Local string &sql = "SELECT 1 FROM PS_HOLIDAY_DATE WHERE HOLIDAY_SCHEDULE = 'KU01' AND HOLIDAY=%DateIn(:1)";
Local integer &StartDateIsHoliday, &EndDateIsHoliday;

SQLExec(&sql, &startDate, &StartDateIsHoliday);
SQLExec(&sql, &endDate, &EndDateIsHoliday);

If All(&StartDateIsHoliday) Then
&G3FRM.segmentError("RW_Edit1_29", "Start Date is a Holiday");
End-If;

If All(&EndDateIsHoliday) Then
&G3FRM.segmentError("RW_Edit1_29", "End Date is a Holiday");
End-If;

end-method;
Page-level Validations (when leaving a page)
  • Override: Additive
  • Path: [Form Application Package]:ValidationEvents
  • Method: method [LogicDescription]_Validation();
  • Annotations: /@Trigger(Type="Page", Value="[Condition$Task$PageNumber])/
  • Register: Form Type Build
  • Release: 3.58.00 Helium
Note: For the validation to display, call the error as follows within the method:
If [condition] then
&G3FRM.pageError([ERROR TEXT]);

Example Code
import G3FORM:Form;

class ValidationEvents
method ValidationEvents();
method checkDaysBetween_Validation();
End-class;

Component G3FORM:Form &G3FRM;

/*@Trigger(Type="Page", Value="Default$ADD$1")*/
method checkDaysBetween_Validation
Local date &startDate = %This.startDateTag.Value;
Local date &endDate = %This.endDateTag.Value;

If All(&startDate, &endDate) And
(Abs(Days(&endDate) - Days(&startDate)) > 365) Then
Local string &errorText = "Days cannot be more than a year apart";
&G3FRM.pageError(&errorText);
End-If;

end-method;
Form Action Validations (when clicking Submit, Approve, Deny, etc.)
  • Override: Additive
  • Path: [Form Application Package]:ValidationEvents
  • Method: method [LogicDescription]_Validation();
  • Annotations: /@Trigger(Type="FormType", Value="")/
  • Register: Form Type Build
  • Release: 3.58.00 Helium
  • Notes:
    • FormSaveError only fires when the ‘Save’ button is pressed. It doesn’t fire on ‘Submit’.
    • If you want the same behavior if the field is changed, include another trigger, using the example below as reference.
Note: For the validation to display, call the error as follows within the method:
If [condition] then
&G3FRM.formSaveError([ERROR TEXT]);

Example Code
import G3FORM:Form;

class ValidationEvents
method ValidationEvents();
method verifySavedDate_Validation();
End-class;

Component G3FORM:Form &G3FRM;

/*@Trigger(Type="SmartSource", Value="[PAGEREC:HRS_SAVED_DT]")*/
/*@Trigger(Type="FormType", Value="")*/
method verifySavedDate_Validation

Local G3FORM:TAGS:FieldTag &savedDateTag;
&savedDateTag = %This.recTag.field("HRS_SAVED_DT");
Local date &savedDate = &savedDateTag.Value;

If None(&savedDate) And
&G3FRM.LastAction = "L" /* save */ Then
&G3FRM.formSaveError("You have to put in a date");
End-If;

end-method;

Workflow Events

Notification Events

Notification SendEvent
  • Description:
    • This event fires for each notification prior to sending a notification. This event can be used to prevent the notification from being sent by returning False in the custom event code. This event can also be used to override the email subject or message for the notification by updating &_Notification.Subject or &_Notification.Message. See G3PT_WF_NOTIFICATION:Notification for available properties and methods.
    • The component string &EMAILTEMPLATE has the email template id.
    • &G3FRM.LastAction has the last form action taken. See G3FORM_ACTION field for translate values.
  • Override:
    • Additive if return Boolean is True
    • Override if return Boolean is False (or not returned)
  • Path: [Form Application Package]:NotificationEvents:NotificationEvents
  • Method: method SendEvent(&_Notification as G3PT_WF_NOTIFICATION:Notification) returns Boolean;
  • Release: 3.10.02
Example Code
class NotificationEvents
method SendEvent(&_Notification As G3PT_WF_NOTIFICATION:Notification) returns boolean;
end-class;

Component G3FORM:Form &G3FRM;
Component string &EMAILTEMPLATE;

method SendEvent
/+ &_Notification as G3PT_WF_NOTIFICATION:Notification +/

MessageBox(0, "", 0, 0, "SendEvent triggered.");

Return True;
end-method;

AWE Workflow Events

OnAdHocDelete
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnAdHocDelete(&_AdHocStepInst as EOAW_CORE:ENGINE:AdHocStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnAdHocDelete(&AdHocStepInst As EOAW_CORE:ENGINE:AdHocStepInst);
end-class;

method OnAdHocDelete
/+ &AdHocStepInst as EOAW_CORE:ENGINE:AdHocStepInst +/
MessageBox(0, "", 0, 0, "OnAdHocDelete triggered.");
end-method;
OnAdHocInsert
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnAdHocInsert(&_AdHocStepInst as EOAW_CORE:ENGINE:AdHocStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnAdHocInsert(&AdHocStepInst As EOAW_CORE:ENGINE:AdHocStepInst);
end-class;

method OnAdHocInsert
/+ &AdHocStepInst as EOAW_CORE:ENGINE:AdHocStepInst +/
MessageBox(0, "", 0, 0, "OnAdHocInsert triggered.");
end-method;
OnAllLinesProcessed
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnAllLinesProcessed(&_AppInst as EOAW_CORE:ENGINE:AppInst);
Example Code
class WorkflowEvents
method OnAllLinesProcessed(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnAllLinesProcessed
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnAllLinesProcessed triggered.");
end-method;
OnError
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnError(&_StepInst as EOAW_CORE_ENGINE:StepInst);
Example Code
class WorkflowEvents
method OnError(&StepInst As EOAW_CORE:ENGINE:StepInst);
end-class;

method OnError
/+ &StepInst as EOAW_CORE:ENGINE:StepInst +/
MessageBox(0, "", 0, 0, "OnError triggered.");
end-method;
OnExecute
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnExecute(&_FormId as String);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnExecute(&_FormId as String);
end-class;

method OnExecute
MessageBox(0, "", 0, 0, "OnExecute triggered.");
end-method;
OnFinalHeaderDeny
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnFinalHeaderDeny(&_AppInst as EOAW_CORE:ENGINE:AppInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnFinalHeaderDeny(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnFinalHeaderDeny
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnFinalHeaderDeny triggered.");
end-method;
OnHeaderApprove
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnHeaderApprove(&_AppInst as EOAW_CORE:ENGINE:AppInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnHeaderApprove(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnHeaderApprove
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnHeaderApprove triggered.");
end-method;
OnHeaderDeny
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnHeaderDeny(&_UserStepInst as EOAW_CORE:ENGINE:UserStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnHeaderDeny(&UserStepInst As EOAW_CORE:ENGINE:UserStepInst);
end-class;

method OnHeaderDeny
/+ &UserStepInst as EOAW_CORE:ENGINE:UserStepInst +/
MessageBox(0, "", 0, 0, "OnHeaderDeny triggered.");
end-method;
OnIBError
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnIBError(&_FormId as String);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnIBError(&FormId As string);
end-class;

method OnIBError
/+ &FormId as String +/
MessageBox(0, "", 0, 0, "OnIBError triggered.");
end-method;
OnLineApprove
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnLineApprove(&_AppInst as EOAW_CORE_ENGINE:AppInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnLineApprove(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnLineApprove
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnLineApprove triggered.");
end-method;
OnLineDeny
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnLineDeny(&_UserStepInst as EOAW_CORE:ENGINE:UserStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnLineDeny(&UserStepInst As EOAW_CORE:ENGINE:UserStepInst);
end-class;

method OnLineDeny
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnLineDeny triggered.");
end-method;
OnLineTerminate
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnLineTerminate(&_AppInst as EOAW_CORE:ENGINE:AppInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnLineTerminate(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnLineTerminate
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnLineTerminate triggered.");
end-method;
OnNoApprovalNecessary
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnNoApprovalNecessary(&_AppInst EOAW_CORE:ENGINE:AppInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnNoApprovalNecessary(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnNoApprovalNecessary
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnNoApprovalNecessary triggered.");
end-method;
OnProcessLaunch
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnProcessLaunch(&_AppInst as EOAW_CORE:ENGINE:AppInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnProcessLaunch(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnProcessLaunch
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnProcessLaunch triggered.");
end-method;
OnRequestInformationAdded
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnRequestInformationAdded(&_UserStepInst as EOAW_CORE:ENGINE:UserStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnRequestInformationAdded(&UserStepInst As EOAW_CORE:ENGINE:UserStepInst);
end-class;

method OnRequestInformationAdded
/+ &UserStepInst as EOAW_CORE:ENGINE:UserStepInst +/
MessageBox(0, "", 0, 0, "OnRequestInformationAdded triggered.");
end-method;
OnStepActivate
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnStepActivate(&_StepInst as EOAW_CORE:ENGINE:StepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnStepActivate(&StepInst As EOAW_CORE:ENGINE:StepInst);
end-class;

method OnStepActivate
/+ &StepInst as EOAW_CORE:ENGINE:StepInst +/
MessageBox(0, "", 0, 0, "OnStepActivate triggered.");
end-method;
OnStepComplete
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnStepComplete(&_StepInst as EOAW_CORE:ENGINE:StepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnStepComplete(&StepInst As EOAW_CORE:ENGINE:StepInst);
end-class;

method OnStepComplete
/+ &StepInst as EOAW_CORE:ENGINE:StepInst +/
MessageBox(0, "", 0, 0, "OnStepComplete triggered.");
end-method;
OnStepHold
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnStepHold(&_UserStepInst as EOAW_CORE:ENGINE:UserStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnStepHold(&UserStepInst As EOAW_CORE:ENGINE:UserStepInst);
end-class;

method OnStepHold
/+ &UserStepInst as EOAW_CORE:ENGINE:UserStepInst +/
MessageBox(0, "", 0, 0, "OnStepHold triggered.");
end-method;
OnStepPushback
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnStepPushback(&_UserStepInst as EOAW_CORE:ENGINE:UserStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnStepPushback(&UserStepInst As EOAW_CORE:ENGINE:UserStepInst);
end-class;

method OnStepPushback
/+ &UserStepInst as EOAW_CORE:ENGINE:UserStepInst +/
MessageBox(0, "", 0, 0, "OnStepPushback triggered.");
end-method;
OnStepReactivate
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnStepReactivate(&_StepInst as EOAW_CORE:ENGINE:StepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnStepReactivate(&StepInst As EOAW_CORE:ENGINE:StepInst);
end-class;

method OnStepReactivate
/+ &StepInst as EOAW_CORE:ENGINE:StepInst +/
MessageBox(0, "", 0, 0, "OnStepReactivate triggered.");
end-method;
OnStepReassign
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnStepReassign(&_UserStepInst as EOAW_CORE:ENGINE:UserStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnStepReassign(&UserStepInst As EOAW_CORE:ENGINE:UserStepInst);
end-class;

method OnStepReassign
/+ &UserStepInst as EOAW_CORE:ENGINE:UserStepInst +/
MessageBox(0, "", 0, 0, "OnStepReassign triggered.");
end-method;
OnStepRequestInformation
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnStepRequestInformation(&_UserStepInst as EOAW_CORE:ENGINE:UserStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnStepRequestInformation(&UserStepInst As EOAW_CORE:ENGINE:UserStepInst);
end-class;

method OnStepRequestInformation
/+ &UserStepInst as EOAW_CORE:ENGINE:UserStepInst +/
MessageBox(0, "", 0, 0, "OnStepRequestInformation triggered.");
end-method;
OnStepReview
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnStepReview(&_StepInst as EOAW_CORE:ENGINE:StepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnStepReview(&StepInst As EOAW_CORE:ENGINE:StepInst);
end-class;

method OnStepReview
/+ &StepInst as EOAW_CORE:ENGINE:StepInst +/
MessageBox(0, "", 0, 0, "OnStepReview triggered.");
end-method;
OnTerminate
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnTerminate(&_AppInst EOAW_CORE:ENGINE:AppInst);
Example Code
class WorkflowEvents
method OnTerminate(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnTerminate
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnTerminate triggered.");
end-method;
OnTimeout
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnTimeout(&_UserStepInst as EOAW_CORE:ENGINE:UserStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnTimeout(&UserStepInst As EOAW_CORE:ENGINE:UserStepInst);
end-class;

method OnTimeout
/+ &UserStepInst as EOAW_CORE:ENGINE:UserStepInst +/
MessageBox(0, "", 0, 0, "OnTimeout triggered.");
end-method;
OnUserLocked
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnUserLocked(&_UserStepInst EOAW_CORE:ENGINE:UserStepInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnUserLocked(&UserStepInst As EOAW_CORE:ENGINE:UserStepInst);
end-class;

method OnUserLocked
/+ &UserStepInst as EOAW_CORE:ENGINE:UserStepInst +/
MessageBox(0, "", 0, 0, "OnUserLocked triggered.");
end-method;

GT Workflow Events

ApprovalRosterResolve

Use this hook to inspect and manipulate the roster members returned for an approval step

  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method ApprovalRosterResolve(&userList as G3AWE:G3AweUserListShim);
  • Release: 3.50
Example Code
method ApprovalRosterResolve
/+ &userList as G3AWE:G3AweUserListShim +/

/*Add an additional approver to the UserLists member string array property*/
&userList.members.push('GTC');

rem – You can also get resolving Stage,Path,Step to use however you need;
Local number &stage = &userList.Config.StepInst.path.stage_nbr;
Local string &path = &userList.Config.StepInst.awpath_id;
Local number &step = &userList.Config.StepInst.step_nbr;
end-method;
StepDescrResolve

Use this hook to programmatically change the step title that shows in the AWE Visualizer

  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method StepDescrResolve(&userList as G3AWE:G3AweUserListShim);
  • Release: 3.50
Example Code
method StepDescrResolve
/+ &userList as G3AWE:G3AweUserListShim +/

rem - Get Resolving Stage,Path,Step to use however you need;
Local number &stage = &userList.Config.StepInst.path.stage_nbr;
Local string &path = &userList.Config.StepInst.awpath_id;
Local number &step = &userList.Config.StepInst.step_nbr;

rem - the UserList's _stepDescr property will be set to the value the framework determines when this event is fired (concatenated Roster names);

rem - You may edit or replace the ._stepDescr property’s value and that is the value that will be used by AWE as the Step Title on the Visualizer;

If &step < 3 Then
rem - add evntTst- to the beginning of the step title for step 1&2 on each path (silly example);
&userList._stepDescr = "evntTst-" | &userList._stepDescr;
End-If;
end-method;

Another Example Changing the 1st Step's Title

Before: A screenshot of the workflow visualizer with the default value for the first step&#39;s title

After: A screenshot of the workflow visualizer with the custom value for the first step&#39;s title

ProcessNotifications
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method ProcessNotifications(&_AppInst as EOAW_CORE:ENGINE:AppInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method ProcessNotifications(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method ProcessNotifications
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "ProcessNotifications triggered.");
end-method;
OverrideQueue
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OverrideQueue(&_AppInst as EOAW_CORE:ENGINE:AppInst);
  • Release: 3.3
Example Code
class WorkflowEvents
method OverrideQueue(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OverrideQueue
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/

Local Message &MSG;
Local Rowset &MSGRS;
&MSG = CreateMessage(Message.ServiceOperationNameHere);
&MSGRS = &MSG.GetRowset();
&MSGRS(1).GetRecord(1).G3FORM_ID.Value = &AppInst.rec.G3FORM_ID.Value;
%IntBroker.Publish(&MSG);

Local Record &formlist = CreateRecord(Record.G3FORMLIST);
&formlist.G3FORM_ID.Value = &AppInst.rec.G3FORM_ID.Value;
&formlist.SelectByKey();
&formlist.G3FORM_STATUS.Value = "A";

/*Begin Auguste T. FD512 4/19/2016 - Admin Tool*/
&GDBG.log(1, "Replacing old IB transaction ID:" | &formlist.IBTRANSACTIONID.Value |
" with new IB transaction ID:" | &MSG.TransactionId);
&formlist.IBTRANSACTIONID.Value = &MSG.TransactionId;

&formlist.Update();
end-method;
OnApproveClick
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnApproveClick(&_AppInst as EOAW_CORE:ENGINE:AppInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnApproveClick(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnApproveClick
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnApproveClick triggered.");
end-method;
OnRecycleClick
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnRecycleClick(&_AppInst as EOAW_CORE:ENGINE:AppInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnRecycleClick(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnRecycleClick
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnRecycleClick triggered.");
end-method;
OnResubmitClick
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnResubmitClick(&_AppInst as EOAW_CORE:ENGINE:AppInst);
  • Release: 3.01
Example Code
class WorkflowEvents
method OnResubmitClick(&AppInst As EOAW_CORE:ENGINE:AppInst);
end-class;

method OnResubmitClick
/+ &AppInst as EOAW_CORE:ENGINE:AppInst +/
MessageBox(0, "", 0, 0, "OnResubmitClick triggered.");
end-method;
OnSaveClick
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnSaveClick(&_FormId as String);
  • Release: 3.1
Example Code
class WorkflowEvents
method OnSaveClick(&FormId As string);
end-class;

method OnSaveClick
/+ &FormId as String +/
MessageBox(0, "", 0, 0, "OnSaveClick triggered.");
end-method;
OnSubmitClick
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnSubmitClick(&_ConfigController as G3AWE:CONFIG:ConfigController);
  • Release: 3.1
Example Code
class WorkflowEvents
method OnSubmitClick(&ConfigController As G3AWE:CONFIG:ConfigController);
end-class;

method OnSubmitClick
/+ &ConfigController as G3AWE:CONFIG:ConfigController +/
MessageBox(0, "", 0, 0, "OnSubmitClick triggered.");
end-method;
OnWithdrawClick
  • Override: Additive
  • Path: [Form Application Package]:WorkflowEvents
  • Method: method OnWithdrawClick(&_ConfigController as G3AWE:CONFIG:ConfigController);
  • Release: 3.1
Example Code
class WorkflowEvents
method OnWithdrawClick(&ConfigController As G3AWE:CONFIG:ConfigController);
end-class;

method OnWithdrawClick
/+ &ConfigController as G3AWE:CONFIG:ConfigController +/
MessageBox(0, "", 0, 0, "OnWithdrawClick triggered.");
end-method;

Integration Events

OnError
  • Override: Additive
  • Path: [Form Application Package]:HandlerEvents
  • Extends: G3AWE:IntegrationBroker:HandlerBase
  • Method: method OnError(&_Form as G3FORM:Form);
  • Release: 3.01
Example Code
method HandlerEvents   
If &GDBG = Null Then
&GDBG = create G3DEBUG:DebugMethods();
&GDBG.debugOn = True;
&GDBG.tempLocation = &GDBG._MESSAGEBOX;
&GDBG.includeLevel = False;
&GDBG.includeContext = False;
End-If;
%Super = create G3AWE:IntegrationBroker:HandlerBase();
end-method;

method OnError
&GDBG.Log(&GDBG._IBLOG, "6.01 Hook (OnError): TRUE.");
end-method;
OnNotify
  • Override: Additive
  • Path: [Form Application Package]:HandlerEvents
  • Extends: G3AWE:IntegrationBroker:HandlerBase
  • Method: method OnNotify(&_Form as G3FORM:Form);
  • Test: Authorize a form. Look at the log in the admin tool for the given form ID.
  • Release: 3.01
Example Code
class HandlerEvents extends G3AWE:IntegrationBroker:HandlerBase
method OnNotify(&Form As G3FORM:Form);
end-class;

method OnNotify
/+ &Form as G3FORM:Form +/
&GDBG.Log(&GDBG._IBLOG, "6.02 Hook (OnNotify): TRUE.");
end-method;

Peoplecode Parts

Parts (SmartSources, Visual If Parts, Custom Segment Drivers) can only be used on a Form Type in either configuration or code if they are defined in the App Package Hierarchy. Each package below can override the package above. The hierarchy is as follows:

  1. System App Package
  2. Family App Package
  3. Search Set App Package
  4. Form Type App Package

Note: Standard allowed PPC Parts to be used from any application package. Helium requires the parts to be defined in the Application Package Hierarchy.

PeopleCode SmartSource
  • Override: Independent
  • Path:
    • [System Application Package]:LogicParts
    • [Family Application Package]:LogicParts
    • [Search Set Application Package]:LogicParts
    • [Form Application Package]:LogicParts
  • Method:
    • Column Segment Fields: method SMARTSRC_[Description]();
    • Grid Segment Fields: method SMARTSRC_[Description](&_rowNum as Integer);
  • Annotations: Yes
  • Register: Form Type Build
  • Release:
    • 3.10.01
    • 3.50.00 – Grid Segment Field option
  • Notes:
    • Peoplecode SmartSources cannot have names longer than 32 Characters, including the prefix convention (SMARTSRC_[name])
    • Each smartsource method will be transformed into a more user-friendly name when searching for it in the browser. This transformation uses the following naming conventions:
      • A capital letter is preceded by a space
      • An underscore is replaced by a space
Example Code
class LogicParts
method SMARTSRC_OprId() Returns string;
method SMARTSRC_RoundAmount(&_rowNum As integer) Returns Integer;
end-class;

method SMARTSRC_OprId
/+ Returns String +/
Return %OperatorId;
end-method;

/*@Dependency(Type="SmartSource", Value="[GRID01:AMOUNT]")*/
method SMARTSRC_RoundAmount
/+ &_rowNum as Integer +/
/+ Returns Integer +/

Local G3FORM:TAGS:RowsetTag &rowsetTag = &G3FRM.rowset("GRID01");
Local G3FORM:TAGS:RecordTag &recordTag;
&recordTag = &rowsetTag.row(&_rowNum).record("GRID01");

Local number &amount = &recordTag.field("AMOUNT").Value;
Return round(&amount,0);

end-method;
PeopleCode VisualIf Part
  • Override: Independent
  • Path:
    • [System Application Package]:LogicParts
    • [Family Application Package]:LogicParts
    • [Search Set Application Package]:LogicParts
    • [Form Application Package]:LogicParts
  • Method:
    • Column Segment Fields: method VISIF_[Description]();
    • Grid Segment Fields: method VISIF_[Description](&_rowNum as Integer);
  • Annotations: Yes
  • Register: Form Type Build
  • Release:
    • 3.10.01
    • 3.50.00 – Grid Segment Field option
  • Notes:
    • Peoplecode Visualif parts cannot have names longer than 32 Characters, including the prefix convention (VISIF_[name])
    • Each Visual If method will be transformed into a more user-friendly name when searching for it in the browser. This transformation uses the following naming conventions:
      • A capital letter is preceded by a space
      • An underscore is replaced by a space
Example Code
class LogicParts
method VISIF_True() Returns boolean;
method VISIF_IsChecked(&_rowNum As integer) Returns boolean;
end-class;

method VISIF_True
/+ Returns Boolean +/
Return True;
end-method;

/*@Dependency(Type="SmartSource", Value="[GRID01:GSCHKBOX]")*/
method VISIF_IsChecked
/+ &_rowNum as Integer +/
/+ Returns Boolean +/

Local G3FORM:TAGS:RowsetTag &rowsetTag = &G3FRM.rowset("GRID01");
Local G3FORM:TAGS:RecordTag &recordTag;
&recordTag = &rowsetTag.row(&_rowNum).record("GRID01");

Local string &checked;
&checked = &recordTag.field("GSCHKBOX");

Return (&checked="Y");

end-method;
PeopleCode Defined Roster
  • Override: Independent
  • Path: [Form Application Package]:DefinedRosters:<Any Class>
  • Extends: G3EMAIL_NOTIFICATION:FilterClasses:EmailFilter
  • Method: method RunFilter() returns Array of String [OprIds];
  • Register: Defined Roster Setup
    • Navigation: Manage GT eForms 3.x > GT Functional Setup > eForm Parts Gallery > Custom Parts > Defined Roster Setup
  • Release: 3.10.01
Example Code
import G3EMAIL_NOTIFICATIONS:FilterClasses:EmailFilter;
import G3EMAIL_NOTIFICATIONS:ParamClasses:ParamCollection;

class HookRoster extends G3EMAIL_NOTIFICATIONS:FilterClasses:EmailFilter
method HookRoster(&filterName As string, &pCollection As G3EMAIL_NOTIFICATIONS:ParamClasses:ParamCollection);
method RunFilter() Returns array of string;
end-class;

method HookRoster
/+ &filterName as String, +/
/+ &pCollection as G3EMAIL_NOTIFICATIONS:ParamClasses:ParamCollection +/
%Super = create G3EMAIL_NOTIFICATIONS:FilterClasses:EmailFilter(&filterName, &pCollection);
end-method;

method RunFilter
/+ Returns Array of String +/
/+ Extends/implements G3EMAIL_NOTIFICATIONS:FilterClasses:EmailFilter.RunFilter +/
Return (CreateArray("GTA1"));
end-method;
Level 1 Grid Pre-Population
  • Override: Independent
  • Path: [Form Application Package]:LogicParts
  • Method: method DATAPOOL_1_$[RECORDNAME]$_[DESCRIPTION](&_Rec as Record) returns Rowset;
  • Annotations: No
  • Register: Form Type Build
  • Release: 3.10.01
Example Code
class LogicParts
method DATAPOOL_1_$G3HOOK_REC1$_HOOKGRID1(&rec As Record) Returns Rowset;
end-class;

method DATAPOOL_1_$G3HOOK_REC1$_HOOKGRID1
/+ &rec as Record +/
/+ Returns Rowset +/

Local Rowset &RetRs = CreateRowset(Record.G3HOOK_REC1);
&RetRs(1).G3HOOK_REC1.G3TEXT1.Value = "Prepop value 1";
&RetRs.InsertRow(1);
&RetRs(2).G3HOOK_REC1.G3TEXT1.Value = "Prepop value 2";
&RetRs.InsertRow(2);
&RetRs(3).G3HOOK_REC1.G3TEXT1.Value = "Prepop value 3";

Return &RetRs;
end-method;

Patterns

Workflow Patterns

Programmatically Enable/Disable Ad-hoc in AWE Visualizer

There is a checkbox on the Form Type Setup that enables/disables the AWE ad-hoc functionality. See the Ad Hoc Functionality documentation in Customer Self-Service for additional information.

A screenshot of the General tab pointing to the Enable Ad Hoc Approvals checkbox

As of 3.50, you can programmatically override that checkbox to enable/disable the AWE ad-hoc functionality by setting this property (&G3FRM.State.adHocEnableOverride) in any hook that fires before the AWE Visualizer shows (e.g. FormInit). The AWE Visualizer shows on the ad-hoc page if it has been added to the page flow and also on the results page.

When &G3FRM.State.adHocEnableOverride = "enable", the AWE visualizer will show with the plus buttons regardless of the value of the Enable Ad Hoc Approvals checkbox:

A screenshot of the workflow visualizer with the ability to insert ad hoc approvers

When &G3FRM.State.adHocEnableOverride = "disable", the AWE visualizer will hide the plus buttons regardless of the value of the Enable Ad Hoc Approvals checkbox:

A screenshot of the workflow visualizer without the option for ad hoc approvers

If &G3FRM.State.adHocEnableOverride is unset or has any other value besides enable or disable, then the ability to insert ad-hoc approvers is based on checkbox on Form Setup.

Workflow Context Aware Parts

Approval configuration definitions can be used for logical branching. Typically this is done in a PeopleCode VisualIf that will return true or false depending on the current approval disposition of the form. For example, a PeopleCode Visual-If can return true if the form is on a particular step.

Any of the configuration elements of form routings can be accessed: AWE Process Definition, Criteria Id, Stage, Path, and Step.

Example 1 - Retrieve the Stage/Path/Step Being Evaluated
Local string &criteriaID = &G3FRM.State.Config.criteriaID;

SQLExec("Select EOAWSTAGE_NBR, EOAWPATH_ID, EOAWSTEP_NBR From PS_G3ROUT_STEP Where G3FORM_TYPE = :1 And G3FORM_CONDITION = :2 And EOAWCRTA_ID = :3", &G3FRM.FormType, &G3FRM.Condition, &criteriaID, &stage, &path, &step);
Example 2 - Retrieve the AWE Process, Definition, & Thread ID
Local Record &crossRefRec = &G3FRM.State.Config.CrossRefRec;
Local string &process = &crossRefRec.EOAWPRCS_ID.Value;
Local string &defn = &crossRefRec EOAWDEFN_ID.Value;
Local integer &threadId = &crossRefRec EOAWTHREAD_ID.Value;

Allow AWE’s Pushback Event

Delivered AWE provides a Pushback event that will allow a current approver to push the workflow back to the previous step. Though GT eForms does not enable this functionality by default, the framework does support its use if needed. To use Pushback, you must implement code that will call the framework’s pushback code. The simplest way to do this is to add a config button to your form for performing the pushback. Once the button is on the form, you can control access to its use with a Visual If that shows/hides or enables/disables the button. The following is an example of how to call the framework’s pushback code to trigger an AWE pushback event from a button’s change method:

Example Code
method GSPUSHBACK_Change
&G3FRM.SegmentList.Get("GTNavButtons").buttonList.get("PUSHBACK").Click();
end-method;

When implementing pushback, remember that only the second approver or higher on a particular AWE transaction thread can call pushback. The first approver will have no one to pushback to and an error will occur if attempted.

Bolt-On Events

Batch Events

FinalizeBatch
  • Override: Additive
  • Path: [Form Application Package]:BatchEvents
  • Method: method FinalizeBatch(&_BatchMethods as G_BATCH:BatchMethods);
  • Sequence: Start
  • Release: 3.01
Example Code
import G_BATCH:BatchMethods;

class BatchEvents
method FinalizeBatch(&_BatchMethods as G_BATCH:BatchMethods);
end-class;

method FinializeBatch
/+ &_BatchMethods as G_BATCH:BatchMethods +/
MessageBox(0, "", 0, 0, "FinializeBatch triggered.");
end-method;
FinalizeForm
  • Override: Optional
  • Path: [Form Application Package]:BatchEvents
  • Method: method FinalizeForm(&_Form as G3FORM:Form);
  • Sequence: Start
  • Release: 3.01
Example Code
import G3FORM:Form;

class BatchEvents
method FinalizeForm(&_Form as G3FORM:Form);
end-class;

method FinializeForm
/+ &_Form as G3FORM:Form +/
MessageBox(0, "", 0, 0, "FinializeForm triggered.");
end-method;
PostFormCreate
  • Override: Additive
  • Path: [Form Application Package]:BatchEvents
  • Method: method PostFormCreate(&_LineRec as Record, &_FieldRs as Rowset, &_Form as G3FORM:Form);
  • Sequence: End
  • Release: 3.01
Example Code
import G3FORM:Form;

class BatchEvents
method PostFormCreate(&_LineRec as Record, &_FieldRs as Rowset, &_Form as G3FORM:Form);
end-class;

method PostFormCreate
/+ &_LineRec as Record +/
/+ &_FieldRs as Rowset +/
/+ &_Form as G3FORM:Form);
MessageBox(0, "", 0, 0, "PostFormCreate triggered.");
end-method;
PopulateField
  • Override: Additive
  • Path: [Form Application Package]:BatchEvents
  • Method: method PopulateField(&_BatchRec as Record, &_SetupRec as Record, &_Form as G3FORM:Form);
  • Sequence: End
  • Release: 3.01
Example Code
import G3FORM:Form;

class BatchEvents
method PopulateField(&_BatchRec as Record, &_SetupRec as Record, &_Form as G3FORM:Form);
end-class;

method PopulateField
/+ &_BatchRec as Record +/
/+ &_SetupRec as Record +/
/+ &_Form as G3FORM:Form);
MessageBox(0, "", 0, 0, "PopulateField triggered.");
end-method;
  • Override: Override
  • Path: [Form Application Package]:BatchEvents
  • Method: method PopulateGrid(&_BatchRec as Record, &_SetupRec as Record, &_Form as G3FORM:Form);
  • Sequence: Start
  • Release: 3.01
Example Code
import G3FORM:Form;

class BatchEvents
method PopulateGrid(&_BatchRec as Record, &_SetupRec as Record, &_Form as G3FORM:Form);
end-class;

method PopulateGrid
/+ &_BatchRec as Record +/
/+ &_SetupRec as Record +/
/+ &_Form as G3FORM:Form);
MessageBox(0, "", 0, 0, "PopulateGrid triggered.");
end-method;
PreProcessBatch
  • Override: Additive
  • Path: [Form Application Package]:BatchEvents
  • Method: method PreProcessBatch(&_BatchMethods as G_BATCH:BatchMethods);
  • Sequence: Start
  • Release: 3.01
Example Code
import G_BATCH:BatchMethods;

class BatchEvents
method PreProcessBatch(&_BatchMethods as G_BATCH:BatchMethods);
end-class;

method PreProcessBatch
/+ &_BatchMethods as G_BATCH:BatchMethods +/
MessageBox(0, "", 0, 0, "PreProcessBatch triggered.");
end-method;
PreProcessLine
  • Override: Additive
  • Path: [Form Application Package]:BatchEvents
  • Method: method PreProcessLine(&_LineRec as Record, &_FieldRs as Rowset);
  • Sequence: Start
  • Release: 3.01
Example Code
class BatchEvents
method PreProcessLine(&_LineRec as Record, &_FieldRs as Rowset);
end-class;

method PreProcessLine
/+ &_LineRec as Record +/
/+ &_FieldRs as Rowset +/
MessageBox(0, "", 0, 0, "PreProcessLine triggered.");
end-method;

Action Center Events

Action Center Detail
  • Override: Override
  • Path: [Form Application Package]:ActionCenterEvents:ActionCenterEvents
  • Method: method GetDetailHTML(&_FormId as String) returns String;
  • Release: 3.10.04
Example Code
class ActionCenterEvents
method GetDetailHTML(&_FormId as String) returns String;
end-class;

method GetDetailHTML
/+ &_FormId as String +/
/+ Returns String +/
Return "";
end-method;
Action Center Filter
  • Override: Override
  • Path: [Form Application Package]:ActionCenterEvents:ActionCenterEvents
  • Method: method GetFormRS(&_Rec as Record) returns Rowset;
  • Test: Open add search for form.
  • Release: 3.10.04
Example Code
class ActionCenterEvents
method GetFormRS(&_Rec as Record) returns Rowset;
end-class;

method GetFormRS
/+ &_Rec as Record +/
/+ Returns Rowset +/
Local Rowset &RetRs = CreateRowset(&_Rec);
Return &RetRs;
end-method;
Action Center Summary
  • Override: Override
  • Path: [Form Application Package]:ActionCenterEvents:ActionCenterEvents
  • Method: method GetSummaryHTML(&_FormId as String) returns String [HTML];
  • Release: 3.10.04
Example Code
class ActionCenterEvents
method GetSummaryHTML(&_FormId as String) returns String;
end-class;

method GetSummaryHTML
/+ &_FormId as String +/
/+ Returns String +/
Return "";
end-method;