Routines for r_svcs.kb


R_AddHistoryToChange

File Name

r_svcs.kb

Syntax

R_AddHistoryToChange(VAL Event_Id: STRING, VAL Event_Notes: STRING) IS

Parameters

Event_Id - ID of history event

Event_Notes - Description of history event

Returns

Nothing

Side Effects

None

Description

This routine adds a history record to the current change request.

Dialog Forms Called

None


R_AddOldChangeToList

File Name

r_svcs.kb

Syntax

R_AddOldChangeToList(VAL this_Change: R_CHANGE_REC) IS

Parameters

this_Change - Current change record

Returns

Nothing

Side Effects

None

Description

This routine adds a change record to the corresponding change list on the AChanges stack.

Dialog Forms Called

None


R_AutoApproveRequest

File Name

r_svcs.kb

Syntax

R_AutoApproveRequest( VAL w: WINDOW, VAL curr_ChangeRequest: R_CHANGE_REC, REF autoApproved: BOOLEAN ): R_CHANGE_REC IS

Parameters

w - The current window handle

curr_ChangeRequest - The current change request

autoApproved - Return code

Returns

Boolean

Side Effects

None

Description

This function determines if the given change request is eligible to be auto-approved. If eligible, then the user is prompted for the status ID of type APPROVED that they wish to apply.

Dialog Forms Called

None


R_CheckForChangeDuplicates

File Name

r_svcs.kb

Syntax

R_CheckForChangeDuplicates(VAL name: STRING, VAL type: INTEGER): BOOLEAN

Parameters

name - Name of record to check

type - Type of record to check

Returns

Boolean

Side Effects

None

Description

This routine determines if a given change record is a duplicate.

Dialog Forms Called

None


R_CheckForModelDuplicates

File Name

r_svcs.kb

Syntax

R_CheckForModelDuplicates(VAL name: STRING, VAL type: INTEGER): BOOLEAN

Parameters

name - Name of record to check

type - Type of record to check

Returns

Boolean

Side Effects

None

Description

This routine determines if a given model record is a duplicate.

Dialog Forms Called

None


R_CheckForSubordinateapprovals

File Name

r_svcs.kb

Syntax

R_CheckForSubordinateapprovals: BOOLEAN IS

Parameters

None

Returns

Boolean

Side Effects

None

Description

This function determines if a change request has any activites. If all of the activities are either APPROVED or "completed", then a return code of TRUE is returned. Otherwise, FALSE is returned.

Dialog Forms Called

None


R_CheckForValidCode

File Name

r_svcs.kb

Syntax

R_CheckForValidCode(VAL Code_Id: STRING, VAL Type: INTEGER): INTEGER IS

Parameters

Code_Id - ID of the code to check

Type - Type of code to check

Returns

Integer

Side Effects

None

Description

This routine determines if specified code is valid.

Dialog Forms Called

None


R_CheckForValidStatus

File Name

r_svcs.kb

Syntax

R_CheckForValidStatus(VAL Status_ID: STRING, VAL Status_Type: STRING): INTEGER IS

Parameters

Status_ID - ID of status to check

Status_Type - Type of status to check

Returns

If valid, it returns a value of 1. Otherwise, it returns an error code.

Side Effects

None

Description

This routine ensures that the entered status is valid.

Dialog Forms Called

None


R_CheckMaxPercent

File Name

r_svcs.kb

Syntax

R_CheckMaxPercent(VAL percent: REAL): REAL IS

Parameters

percent - percent to check

Returns

Real

Side Effects

None

Description

This routine checks to see if a percent value is greater than 100%.

Dialog Forms Called

None


R_CompareFindDates

File Name

r_svcs.kb

Syntax

R_CompareFindDates(VAL w: WINDOW): INTEGER IS

Parameters

w - Current window

Returns

Integer

Side Effects

None

Description

This routine ensures that the start date is less than the end date.

Dialog Forms Called

None


R_ConvertIntMilliSecToRealSec

File Name

r_svcs.kb

Syntax

R_ConvertIntMilliSecToRealSec(VAL milliTime: INTEGER): REAL IS

Parameters

milliTime - Time in milliseconds to be converted to seconds

Returns

Real

Side Effects

None

Description

This routine converts milliseconds into real seconds.

Dialog Forms Called

None


R_ConvertPeopleRec

File Name

r_svcs.kb

Syntax

R_ConvertPeopleRec( a, b );

Parameters

a - BrowsePeopleListRec

b - BrowsePeopleInstRec

Returns

Nothing

Side Effects

The second parameter will be assigned values from the first parameter.

Description

This function allows TCM to convert one set of problem data from record structure BrowsePeopleListRec to BrowsePeopleInstRec.

Dialog Forms Called

None


R_DeleteUnNeededNotebookTabs

File Name

r_svcs.kb

Syntax

R_DeleteUnNeededNotebookTabs( VAL w: WINDOW ) IS

Parameters

w - Current window

Returns

Nothing

Side Effects

None

Description

This routine deletes specific dialog box tabs. Because one dialog box may be used by customers who may or may not have TPM and/or TAM installed, certain dialog tabs may not need to be exposed.

Dialog Forms Called

None


R_ExecuteChangeCommand

File Name

r_svcs.kb

Syntax

R_ExecuteChangeCommand( VAL Execute_Command: R_COMMANDS_REC): INTEGER

Parameters

Execute_Command - Current command record

Returns

INTEGER

Side Effects

None

Description

This routine executes a system command.

Dialog Forms Called

None


R_FindChangeInList

File Name

r_svcs.kb

Syntax

R_FindChangeInList(VAL ID: INTEGER, VAL Changes: LIST OF R_CHANGE_REC ): R_CHANGE_REC IS

Parameters

ID - Change ID

Changes - List of changes to search

Returns

R_CHANGE_REC

Side Effects

None

Description

This routine retrieves the change for the specified ID.

Dialog Forms Called

None


R_FindHistoryInList

File Name

r_svcs.kb

Syntax

R_FindHistoryInList(VAL old_History: R_HISTORY_REC, VAL HistoryList: LIST OF R_HISTORY_REC ): R_HISTORY_REC IS

Parameters

old_History - Old history record

HistoryList - List of history to search

Returns

R_HISTORY_REC

Side Effects

None

Description

This routine retrieves the history for the specified record.

Dialog Forms Called

None


R_FireCommand

File Name

r_svcs.kb

Syntax

R_FireCommand IS

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine fires, or executes, a system command.

Dialog Forms Called

None


R_FormatResourceName

File Name

r_svcs.kb

Syntax

R_FormatResourceName(REF ResourceName: STRING, VAL direction: INTEGER) IS

Parameters

ResourceName - Reformatted resource name

direction - Specifies whether going to or coming from MS Project

Returns

Nothing

Side Effects

None

Description

This routine formats the resource name for use in MS Project.

Dialog Forms Called

None


R_GetActivityIndexForChange

File Name

r_svcs.kb

Syntax

R_GetActivityIndexForChange: INTEGER;

Parameters

None

Returns

Integer

Side Effects

None

Description

This routine returns the index of the current change activity list.

Dialog Forms Called

None


R_GetActivityIndexForModel

File Name

r_svcs.kb

Syntax

R_GetActivityIndexForModel(VAL R_G_SModel: R_MODEL_STATE_REC ): INTEGER IS

Parameters

R_G_SModel - Current R_G_SModel record

Returns

Integer

Side Effects

None

Description

This routine returns the index for the current model activity list.

Dialog Forms Called

None


R_GetChangeAttachmentMatchingMCLB

File Name

r_svcs.kb

Syntax

R_GetChangeAttachmentMatchingMCLB(VAL w: WINDOW VAL field_Name: STRING, REF this_Attachment: R_CHANGE_ATTACHMENT_REC): INTEGER;

Parameters

w - Current window

field_Name - Name of MCLB

this_Attachment - Current Attachment

Returns

Integer

Side Effects

None

Description

This routine finds the index for an attachment record matching the MCLB.

Dialog Forms Called

None


R_GetChangeStatusesForSubmittal

File Name

r_svcs.kb

Syntax

R_GetChangeStatusesForSubmittal( REF Submit_List: LIST OF R_STATUS_REC, VAL status_Type: STRING) IS

Parameters

Submit_List - List of statuses found

status_Type - Type of status to retrieve

Returns

Nothing

Side Effects

None

Description

This routine returns a list of status codes.

Dialog Forms Called

None


R_GetChangeValuesForField

File Name

r_svcs.kb

Syntax

R_GetChangeValuesForField(VAL TableName: STRING, VAL FieldName: STRING, REF ValueList: LIST OF STRING) IS

Parameters

TableName - Table name

FieldName - Field name of attribute

ValueList - List of values extracted

Returns

Nothing

Side Effects

None

Description

This routine returns the values of an attribute in the change record.

Dialog Forms Called

None


R_GetCommandFromList

File Name

r_svcs.kb

Syntax

R_GetCommandFromList(VAL Command_Name: STRING, REF this_Command: R_COMMANDS_REC) IS

Parameters

Command_Name - Name of command to retrieve

this_Command - Current command record

Returns

Nothing

Side Effects

None

Description

This routine returns the command record for a specified command.

Dialog Forms Called

None


R_GetearliestTaskStartDate

File Name

r_svcs.kb

Syntax

R_GetearliestTaskStartDate: DATE IS

Parameters

None

Returns

DATE

Side Effects

None

Description

This routine finds the earliest start date for all scheduled tasks for a change request.

Dialog Forms Called

None


R_GetOrgName

File Name

r_svcs.kb

Syntax

R_GetOrgName(VAL id: STRING): STRING IS

Parameters

id - People ID

Returns

String

Side Effects

None

Description

This routine returns the organization name of the given organization ID.

Dialog Forms Called

None


R_GetPersonFromUserID

File Name

r_svcs.kb

Syntax

R_GetPersonFromUserID(VAL id: STRING): BrowsePeopleListRec IS

Parameters

id - User ID

Returns

BrowsePeopleListRec

Side Effects

None

Description

This routine returns a people record from user ID.

Dialog Forms Called

None


R_GetPersonName

File Name

r_svcs.kb

Syntax

R_GetPersonName(VAL id: INTEGER): STRING IS

Parameters

id - People ID

Returns

String

Side Effects

None

Description

This routine returns the full name of a person from the people table.

Dialog Forms Called

None


R_GetPersonNotifyString

File Name

r_svcs.kb

Syntax

R_GetPersonNotifyString( VAL id: STRING, REF ntfy: NotifySendRec, REF type: INTEGER) IS

Parameters

id - ID of user

ntfy - Current notify send record

type - Type of notification

Returns

Nothing

Side Effects

None

Description

This routine returns a notification string to be sent to a user.

Dialog Forms Called

None


R_GetRelationConst

File Name

r_svcs.kb

Syntax

R_GetRelationConst(VAL Relation: STRING): INTEGER IS

Parameters

Relation - TCM relation constant

Returns

Integer

Side Effects

None

Description

This routine converts a TCM task relation to an MS Project relation constant.

Dialog Forms Called

None


R_GetValidStatusRecord

File Name

r_svcs.kb

Syntax

R_GetValidStatusRecord(VAL New_Status: STRING) : R_STATUS_REC

Parameters

New_Status - The Status ID for a given change request

Returns

R_STATUS_REC - The Status record for the given status ID

Side Effects

None

Description

This routine returns the status record matching the passed-in status ID.

Dialog Forms Called

None


R_HasRight

File Name

r_svcs.kb

Syntax

R_HasRight(VAL right: INTEGER, VAL security_mask: INTEGER): BOOLEAN IS

Parameters

right - Security right for which to check

security_mask - Security mask

Returns

Boolean

Side Effects

None

Description

This routine appends the system administration right when calling the HasRight function.

Dialog Forms Called

None


R_ISNULL

File Name

r_svcs.kb

Syntax

R_ISNULL(VAL inString: STRING, VAL nullVal: STRING): STRING IS

Parameters

inString - String to R_Perform check

nullVal - Value to return if inString is $UnKnown

Returns

String

Side Effects

None

Description

This routine converts $UnKnown to a null value.

Dialog Forms Called

None


R_IsPersonInOrg

File Name

r_svcs.kb

Syntax

R_IsPersonInOrg(VAL organization_id: STRING, VAL people_id: INTEGER): BOOLEAN IS

Parameters

organization_id - Organization ID

people_id - People ID

Returns

Boolean

Side Effects

None

Description

This routine determines if a user is part of an organization.

Dialog Forms Called

None


R_LoadAttachToList

File Name

r_svcs.kb

Syntax

R_LoadAttachToList( REF attach_to_list: LIST OF STRING )

Parameters

attach_to_list - Empty list

Returns

None

Side Effects

None

Description

This routine loads fields that are eligible to have file attachments.

Dialog Forms Called

None


R_LoadRelevantStatusCodesIntoComboBox

File Name

r_svcs.kb

Syntax

R_LoadRelevantStatusCodesIntoComboBox(VAL w: WINDOW, VAL field_Name: STRING, VAL Status_List: LIST OF STRING):INTEGER IS

Parameters

w - Current window

field_Name - Name of the combo box

Status_List - List of statuses to display

Returns

Integer

Side Effects

None

Description

This routine loads the specified statuses into a specified combo box.

Dialog Forms Called

None


R_LoadResourcesForSchedule

File Name

r_svcs.kb

Syntax

R_LoadResourcesForSchedule;

Parameters

None

Returns

INTEGER

Side Effects

None

Description

This routine retrieves resources for a schedule task from the database.

Dialog Forms Called

None


R_LoadRights

File Name

r_svcs.kb

Syntax

R_LoadRights;

Parameters

None

Returns

Nothing

Side Effects

None

Description

Loads rights for the user in global variables.

Dialog Forms Called

None


R_MailMessageFromStrings

File Name

r_svcs.kb

Syntax

R_MailMessageFromStrings(VAL strings: LIST OF STRING) : STRING IS

Parameters

strings - Mail message data

Returns

String

Side Effects

None

Description

This routine creates a mail message from a list of strings.

Dialog Forms Called

None


R_MapTableFieldToText

File Name

r_svcs.kb

Syntax

R_MapTableFieldToText(VAL Table: STRING, VAL Field: STRING, REF TextField: STRING): INTEGER;

Parameters

Table - Database table to translate

Field - Database field to translate

TextField - text string returned

Returns

Integer

Side Effects

None

Description

This routine translates a field:table combination into a text string for file attachments.

Dialog Forms Called

None


R_MapTextToTableField

File Name

r_svcs.kb

Syntax

R_MapTextToTableField(REF Table: STRING, REF Field: STRING, VAL TextField: STRING): INTEGER;

Parameters

Table - Database table returned

Field - Database field returned

TextField - text string to translate

Returns

Integer

Side Effects

None

Description

Translates a text string into a field:table combination for file attachments.

Dialog Forms Called

None


R_ParseapprovalText

File Name

r_svcs.kb

Syntax

R_ParseapprovalText(VAL Text:STRING, REF lstText:LIST OF STRING, VAL Delimiter:STRING) IS

Parameters

Text - Parse text

lstText - Text to insert

Delimiter - Delimited with

Returns

Nothing

Side Effects

None

Description

This routine parses approval text.

Dialog Forms Called

None


R_ParseMemberVote

File Name

r_svcs.kb

Syntax

R_ParseMemberVote(VAL w:WINDOW, VAL thisPerson:BrowsePeopleListRec, VAL Approval:R_APPROVAL_REC, VAL UpdateGUI:Boolean, VAL appr_type:STRING): R_DISP_REC IS

Parameters

w - Handle to dialog box

thisPerson - Approver of interest

Approval - Approval record for change

UpdateGUI - Decides to update GUI or not

appr_type - Approval type

Returns

R_DISP_REC

Side Effects

None

Description

This routine parses, or finds, actual dispositions and reasons for a given Change Control Board group member.

Dialog Forms Called

None


R_PeopleMatchesEvent

File Name

r_svcs.kb

Syntax

None

Parameters

None

Returns

Nothing

Side Effects

None

Description

This routine is the event handler for people matches.

Dialog Forms Called

None


R_ProcessAttachmentEntryFields

File Name

r_svcs.kb

Syntax

R_ProcessAttachmentEntryFields(VAL w: WINDOW, REF this_Attachment: R_CHANGE_ATTACHMENT_REC, VAL type: INTEGER)

Parameters

w - Current window

this_Attachment - Current attachment record

type - Type of interaction to R_Perform.

Returns

Integer

Side Effects

None

Description

This routine handles loading, extracting, and clearing attachments.

Dialog Forms Called

None


R_PromptUserForStatusID

File Name

r_svcs.kb

Syntax

R_PromptUserForStatusID( VAL w: WINDOW, REF thisStatus: R_STATUS_REC ): INTEGER IS

Parameters

w - Current window

thisStatus - Current status record

Returns

Integer

Side Effects

None

Description

This routine determines if a client has defined more than one status ID for a status type. If they do, prompt the user to choose which status ID they wish to use. [ for instance, If the status type were APPROVED, the client may have defined status IDs of 'Approved by Level 1' and 'Completely Approved' ]

Dialog Forms Called

rchg.dfc[status_list]


R_RecordDeletable

File Name

r_svcs.kb

Syntax

R_RecordDeletable(VAL w: WINDOW, REF R_G_SChange: R_CHANGE_STATE_REC, VAL field_Name: STRING, VAL type: INTEGER): BOOLEAN;

Parameters

w - Current window

R_G_SChange - R_CHANGE_STATE_REC

field_Name - Name of field to check

type - Type of record to check

Returns

Boolean

Side Effects

None

Description

This routine checks to see if a change record can be deleted. Look for the column name "deletable" when perusing this routine.

Dialog Forms Called

None


R_RestartApprovals

File Name

r_svcs.kb

Syntax

R_RestartApprovals: INTEGER IS

Parameters

None

Returns

Integer

Side Effects

None

Description

This routine clears approval dispositions and reasons for a change request. Next, a notification is sent to all approvers of this change request who have already approved it or are currently eligible to approve. In this way, they will gain some understanding that they may have to re-approve this change.

Dialog Forms Called

None


R_RestructureTextComponent

File Name

r_svcs.kb

Syntax

R_RestructureTextComponent(VAL type: INTEGER) IS

Parameters

type - Type of string to divide

Returns

Nothing

Side Effects

None

Description

This routine divides text which exceeds 254 characters in length.

Dialog Forms Called

None


R_ReturnImpactAnalysisForm

File Name

r_svcs.kb

Syntax

R_ReturnImpactAnalysisForm: STRING IS

Parameters

None

Returns

String

Side Effects

None

Description

Returns version of the Impact Analysis dialog box based upon the TSD applications installed.

Dialog Forms Called

rmod.dfc[sa_eaefm_impactanalysis]

rmod.dfc[impactanalysis]


R_SendMessageToApproverType

File Name

r_svcs.kb

Syntax

R_SendMessageToApproverType( VAL ntfy: NotifySendRec, VAL notifyType: INTEGER, VAL approver_type: STRING, VAL user_id: STRING, VAL group_id: STRING, VAL site_id: STRING ): INTEGER IS

Parameters

ntfy - Notification record

notifyType - Notification type

approver_type - Approver type

user_id - User ID of the receiver

group_id - Approval group name

site_id - The current site ID

Returns

Integer

Side Effects

None

Description

This routine sends the already-generated notification message to a specific approval requirement whether a user or group.

Dialog Forms Called

None


R_SendNotification

File Name

r_svcs.kb

Syntax

R_SendNotification(VAL ntfy: NotifySendRec, VAL type: INTEGER): INTEGER IS

Parameters

type - Type of notification

ntfy - Current notify send record

Returns

Integer

Side Effects

None

Description

This routine sends a notification to a user.

Dialog Forms Called

None


R_SendPersonNotification

File Name

r_svcs.kb

Syntax

R_SendPersonNotification(VAL personType: INTEGER, VAL stateTypeText: STRING): INTEGER IS

Parameters

personType - Type of person to notify

stateTypeText - Text to send to the person

Returns

Integer

Side Effects

None

Description

This routine sends a notification to the specified person.

Dialog Forms Called

None


R_SendUserFax

File Name

r_svcs.kb

Syntax

R_SendUserFax(VAL ntfy: NotifySendRec): INTEGER IS

Parameters

ntfy - Current notify send record

Returns

Integer

Side Effects

None

Description

This routine sends a fax notification to a user.

Dialog Forms Called

None


R_SetAlterFlagForHiddenID

File Name

r_svcs.kb

Syntax

R_SetAlterFlagForHiddenID(REF Alter_Flag: INTEGER, VAL old: STRING, VAL new: STRING) IS

Parameters

Alter_Flag - Alter state to which to set the field

old - Old value of the field

new - New value of the field

Returns

Nothing

Side Effects

None

Description

This routine sets the alter flag for a hidden field.

Dialog Forms Called

None


R_StrCompress

File Name

r_svcs.kb

Syntax

R_StrCompress(VAL old_String: STRING): STRING IS

Parameters

old_String - String to compress

Returns

String

Side Effects

None

Description

This routine removes consecutive spaces from a string.

Dialog Forms Called

None


R_StrToken

File Name

r_svcs.kb

Syntax

R_StrToken(REF source: STRING, VAL delimiters: STRING): STRING IS

Parameters

source - String to tokenize

delimeters - Delimeters to use for tokenization

Returns

String

Side Effects

None

Description

This routine is a rewritten version of StrToken to support multiple delimeters.

Dialog Forms Called

None


R_SwitchFindDates

File Name

r_svcs.kb

Syntax

R_SwitchFindDates(VAL w: WINDOW, VAL hld: INTEGER, REF this_FindChange: R_FIND_CHANGE_REC) IS

Parameters

w - Current window

hld - Date type

this_FindChange - Current find change record

Returns

Nothing

Side Effects

None

Description

This routine toggles between plan start dates and creation dates.

Dialog Forms Called

None


R_UpdateChangeAttachmentList

File Name

r_svcs.kb

Syntax

R_UpdateChangeAttachmentList(VAL this_Attachment: R_CHANGE_ATTACHMENT_REC)

Parameters

this_Attachment - The attachment to be added, modified or deleted

Returns

None

Side Effects

None

Description

This routine handles adding, modifying and removal of attachments.

Dialog Forms Called

None


R_UpdateFieldsWithNotice

File Name

r_svcs.kb

Syntax

R_UpdateFieldsWithNotice(VAL win: WINDOW)

Parameters

win - Window handle of the dialog box where the change is currently displayed

Returns

None

Side Effects

None

Description

This routine updates the "See attached file(s)" notice for a record.

Dialog Forms Called

None


R_UpdateIntegerEntryValue

File Name

r_svcs.kb

Syntax

R_UpdateIntegerEntryValue(VAL w: WINDOW, VAL field_Name: STRING, REF field_Value: INTEGER, REF Alter_Flag: INTEGER) IS

Parameters

w - Current window

field_Name - Name of field to extract

field_Value - Value of field

Alter_Flag - What state the new field has

Returns

Nothing

Side Effects

None

Description

This routine updates the value for an integer entry field.

Dialog Forms Called

None


R_UpdateStringEntryValue

File Name

r_svcs.kb

Syntax

R_UpdateStringEntryValue(VAL w: WINDOW, VAL field_Name: STRING, REF field_Value: STRING, REF Alter_Flag: INTEGER);

Parameters

w - Current window

field_Name - Field name to reteive data from

field_Value - Data retreived from the field

Alter_Flag - Current Alter_Flag State

Returns

Nothing

Side Effects

None

Description

This routine updates the value for a string entry field.

Dialog Forms Called

None


R_UpdateTextFieldWithNotice

File Name

r_svcs.kb

Syntax

R_UpdateTextFieldWithNotice(VAL win: WINDOW, VAL fieldName: STRING, VAL foundAttach: BOOLEAN, REF textField: STRING)

Parameters

win - Current window

fieldName - Field name to add the notice to

foundAttach - Flag to determine if a match was found

textField - Text to append

Returns

None

Side Effects

None

Description

This routine appends the "See attached file(s)" notice to the end of a given text field.

Dialog Forms Called

None