Routines for c_dsvcs.kb


AssignNumbersToMenuList

File Name

c_dsvcs.kb

Syntax

AssignNumbersToMenuList(VAL MenuTextList: LIST OF STRING, REF MenuList: LIST OF MenuListRec)

Parameters

MenuTextList - list of menu items for the menu bar

Returns

MenuList - list of MenuListRec which contains the appropriate

menu number for each menu item in the list

Side Effects

None

Description

This routine assigns the appropriate menu number for a list of menu items. The number assigned accounts for line separators and multiple columns of items for the menu list.

Dialog Forms Called

None


C_GetMleText

File Name

c_dsvcs.kb

Syntax

C_GetMleText (VAL dlgHdl:WINDOW, VAL mleFld:STRING, REF strVar:STRING, REF strVarOverFlow:STRING)

Parameters

dlgHdl - handle to the dialog box

mleFld - name of the MLE field

strVar - string variable to store the MLE text

strVarOverFlow - over flow string variable to store the rest of the MLE text over 254 characters

Returns

strVar and strVarOverFlow

Side Effects

None

Description

Takes the text in the MLE control and stores it in the strVar and strVarOverFlow variables.

Dialog Forms Called

None


C_SetMleText

File Name

c_dsvcs.kb

Syntax

C_SetMleText (VAL dlgHdl:WINDOW, VAL mleFld:STRING, REF strVar:STRING, REF strVarOverFlow:STRING)

Parameters

dlgHdl - handle to the dialog box

mleFld - name of the MLE field

strVar - string variable that stores the MLE text

strVarOverFlow - over flow string variable that stores the rest of the MLE text over 254 characters

Returns

None

Side Effects

None

Description

Concatenates the given string variables (if necessary) and puts the result into the given mleFld.

Dialog Forms Called

None


ClearInquiryScreen

File Name

c_dsvcs.kb

Syntax

ClearInquiryScreen(VAL inquiryWindow: WINDOW, VAL controlList: LIST OF STRING)

Parameters

inquiryWindow - the handler of the inquiry window

controlList - the list of control fields

Returns

None

Side Effects

None

Description

Clears the list of control fields and sets the cursor to the first field in the control list.

Dialog Forms Called

None


ConfirmCancel

File Name

c_dsvcs.kb

Syntax

ConfirmCancel(VAL w: WINDOW): BOOLEAN

Parameters

w - the handler of the inquiry window.

Returns

TRUE or FALSE

Side Effects

None

Description

Asks the user for confirmation to cancel out of a dialog box.

Dialog Forms Called

None


CreateInvalidDataFieldMessage

File Name

c_dsvcs.kb

Syntax

CreateInvalidDataFieldMessage( VAL inputList: LIST OF STRING, REF outputString: STRING )

Parameters

inputList - list of objects that are invalid

outputString - concatenated list of objects that are invalid

Returns

outputString

Side Effects

None

Description

This function takes the list of items in inputList and concatenates them into a comma separated string, outputString.

Dialog Forms Called

None


EnableButton

File Name

c_dsvcs.kb

Syntax

EnableButton ( VAL WwWindow: Window, VAL fieldName: STRING, VAL buttonList: LIST OF STRING, VAL formFile: STRING, VAL formName: STRING )

Parameters

WwWindow - the Work With window handle

fieldName - the control on which to check the number of rows

buttonList - the list of buttons to be enabled or disabled

formFile - the file name (for instance, problems.dfc)

formName - the form name (for instance, WORKWITHPROBLEMS)

Returns

Nothing

Side Effects

None

Description

Counts the number of records in the Work With window. Disables or enables the list of buttons when zero or more than zero, respectively. Issues a check authority when enabling the list of buttons.

Dialog Forms Called

None


EnableNoteBookButton

File Name

c_dsvcs.kb

Syntax

EnableNoteBookButton ( VAL WwWindow: Window, VAL fieldName: STRING, VAL buttonList: LIST OF STRING, VAL formFile: STRING, VAL formName: STRING, VAL entryName:STRING )

Parameters

WwWindow - the Work With window handle

fieldName - the control on which to check the number of rows

buttonList - the list of buttons to be enabled or disabled

formFile - the file name (for instance, problems.dfc)

formName - the form name (for instance, WORKWITHPROBLEMS)

entryName - the entry count name for the tab of the dialog box

Returns

None

Side Effects

None

Description

Counts the number of records in the Work With window. Disables or enables the list of buttons when zero or more than zero, respectively. Issues a check authority when enabling the list of buttons.

Dialog Forms Called

None


FilterConvert

File Name

c_dsvcs.kb

Syntax

FilterConvert(REF filter: STRING): BOOLEAN

Parameters

filter -

Returns

TRUE if finds an old filter symbol in the string, FALSE otherwise.

Side Effects

None

Description

Updates the filter and replaces the old filter symbol with the new filter symbol.

Dialog Forms Called

None


GetMenuNumberForActionID

File Name

c_dsvcs.kb

Syntax

GetMenuNumberForActionID;

Parameters

MenuList - list of menuListRec for the dialog box menu bar

Returns

The menu number of the desired system action ID

Side Effects

None

Description

This routine returns the text of the menu number for the desired system action ID.

Dialog Forms Called

None


GetSelectedMenuNumber

File Name

c_dsvcs.kb

Syntax

GetSelectedMenuNumber(VAL thisMenuText: STRING, VAL MenuList: LIST OF menuListRec): INTEGER

Parameters

MenuList - list of menuListRec for the dialog box menu bar

Returns

The menu text of the selected menu item

Side Effects

None

Description

This routine returns the text of the menu item that was selected.

Dialog Forms Called

None


GetSelectedMenuText

File Name

c_dsvcs.kb

Syntax

GetSelectedMenuText(VAL thisMenuNumber: INTEGER, VAL MenuList: LIST OF menuListRec): STRING

Parameters

MenuList - list of menuListRec for the dialog box menu bar

Returns

The menu item number for the menu text in question

Side Effects

None

Description

This routine returns the menu item number of the menu item text that was selected.

Dialog Forms Called

None


GetTSDListsAndPrefs

File Name

c_dsvcs.kb

Syntax

GetTSDListsAndPrefs

Parameters

None

Returns

None

Side Effects

None

Description

Fills lists for currency, contract status, and contract types. Also sets default currency code. These lists are global variables declared in c_gconst.kb

Dialog Forms Called

None


GroupMatchesEvent

File Name

c_dsvcs.kb

Syntax

GroupMatchesEvent(REF Context: GroupMatchesEventContextRecordType)

Parameters

Context - list of GroupRecord

Returns

Context - list of GroupRecord

Side Effects

None

Description

Event handler for group matches.

Dialog Forms Called

groups.dfc[available_groups]

groups.dfc[multi_select_group_form]

groups.dfc[non_multi_select_group_form]


InitializeAEV

File Name

c_dsvcs.kb

Syntax

InitializeAEV(VAL w: WINDOW, VAL mode: INTEGER, VAL title: STRING

Parameters

w - window handle of the current dialog box

mode - the mode in which the user uses the dialog box with regard to add, edit, view

title - the text used in the title bar of the dialog box

Returns

Nothing

Side Effects

None

Description

This function disables the OK and Cancel button in view mode. It also sets the title on the dialog box as View Title, Edit Title, or Add Title where Title can be Location, for instance.

Dialog Forms Called

None


LoadGenericList

File Name

c_dsvcs.kb

Syntax

LoadGenericList ( VAL w: WINDOW, VAL fieldName: STRING, VAL select: STRING)

Parameters

w - window handle of dialog where the listbox needs to be filled

fieldName - the fieldName of the control that needs to be filled

select - the select statement that returns the data to fill the control with

Returns

None

Side Effects

None

Description

This is a generic procedure that takes a select statement and uses it to fill in data for a listbox, or sqlmanage control.

Dialog Forms Called

None


PickFromList

File Name

c_dsvcs.kb

Syntax

PickFromList ( VAL parent: Window, VAL title: String, REF l: List of String, VAL multiOnOrOff: BOOLEAN ): LIST OF INTEGER

Parameters

parent - the parent dialog to the the picklistform

title - the title to be displayed on the picklistform

l - the list of items to place in the picklist

multiOnOrOff - flag to indicate if able to select multiple items in the list

Returns

The indexes of the items selected from the picklistform

Side Effects

None

Description

This function launches a dialog box with a list of items for the user to pick from. It returns the indices of the items selected.

Dialog Forms Called

pick.dfc[picklistform]


PickFromListEvent

File Name

c_dsvcs.kb

Syntax

PickFromListEvent ( REF r: listRecord )

Parameters

r - a record that is used to fill a list box

Returns

The index of the item that was selected from the list

Side Effects

None

Description

This event displays a list and returns the index number of the item selected. Only called by function PickFromList.

Dialog Forms Called

pick.dfc[multi_select_pick_form]

pick.dfc[non_multi_select_pick_form]

pick.dfc[picklistform]


ProcessUserMessage

File Name

c_dsvcs.kb

Syntax

ProcessUserMessage( VAL w: WINDOW, VAL title: STRING, VAL messageString: STRING, VAL typeOfMessage: INTEGER, VAL typeOfButton: INTEGER ): INTEGER

Parameters

w - current window handle

title - title to display in message box

messageString - text of message to display in message box

typeOfMessage - used to default the icons in the message box

typeOfButton - used to default the buttons in the message box

Returns

Integer return code for the message box. This is based on the type

of button.

Side Effects

None

Description

Displays the given user message.

Dialog Forms Called

None


RequestSelectField

File Name

c_dsvcs.kb

Syntax

RequestSelectField(VAL w: WINDOW, VAL fieldName: STRING )

Parameters

w - target window handle

FieldName - name of the field to receive focus

Returns

None

Side Effects

None

Description

Sets focus to the desired field. This routine is often called from a Post Message so that the focus is set after all other messages in the queue are processed.

Dialog Forms Called

None


SetButtonList

File Name

c_dsvcs.kb

Syntax

SetButtonList(VAL WwWindow: Window,VAL buttonList: LIST OF STRING,VAL enableFlag: BOOLEAN)

Parameters

WwWindow - the window handle of the dialog

buttonList - list of string, a list of button names

enableFlag - Boolean

Returns

Nothing

Side Effects

None

Description

This procedure enables or disables the list of buttons on the dialog box based on enableFlag.

Dialog Forms Called

None


WinInit

File Name

c_dsvcs.kb

Syntax

WinInit(VAL w: WINDOW)

Parameters

w - the window handle

Returns

None

Side Effects

None

Description

Clears the dialog box and sets the font.

Dialog Forms Called

None


WinStatus

File Name

c_dsvcs.kb

Syntax

WinStatus(VAL w: WINDOW, VAL text: STRING, REF coord: INTEGER)

Parameters

w - window handle of scroll window

text - text to be written to the window

coord - location to write the text

Returns

None

Side Effects

None

Description

Initializes a scroll window.

Dialog Forms Called

None