Skip to main content

Table functions

dbo.ftApprovers

Position for determining the approvers of a specific approval step.

Parameters

NameTypeDescription
@approvalItemIdint

Return table

ColumnTypeDescription
iPersonIdintApprover ID (tPerson.iPersonId).
sPersonnvarchar(1024)Approver name.
sPersonEmailnvarchar(1024)Approver e-mail.
isDelegateApproverbitIf 1, it is a delegate of an approver. The approver is currently out of office.

dbo.ftAttendanceMonthReport

Function that creates the table for the employee's monthly report

Parameters

NameTypeDescription
@monthint
@yearint
@personIdint
@curPersonIdint

Return table

ColumnTypeDescription
idint
daydatetime
lastMidnightdatetime
nextMidnightdatetime
isWeekendbit
workTimefloat
holidaynvarchar(255)
doLinkbit
coverWithWorkLoadbit
toleranceint

dbo.ftCanManageKnowledge

List of services and articles that the given user may administer.

Parameters

NameTypeDescription
@userIdint

Return table

ColumnTypeDescription
SectionIdint
ArticleIdint

dbo.ftCommaListToTableIds

Conversion of value list string (ID,ID,...) to value table.

Parameters

NameTypeDescription
@listnvarchar(max)

Return table

ColumnTypeDescription
idint

dbo.ftCompanySearch

Search of organizations across all system items.

Parameters

NameTypeDescription
@samplenvarchar(100)
@accountIdint

Return table

ColumnTypeDescription
AccountIdint
CompanyInfonvarchar(300)
Addressnvarchar(max)
Address2nvarchar(max)
ItemOrderint

dbo.ftComputerSwManager

People responsible for software installed on the computer

Parameters

NameTypeDescription
@ComputerIdint

Return table

ColumnTypeDescription
ComputerIdint
SwManagerNodeIdint
SwManagerPersonIdint

dbo.ftDeviceSearch

Searching for the object in the tree. Returns a table of objects matching the entered parameters arranged by the path in the tree. The function can be customized. In order to customize the function, create a new function named ftDeviceSearch_Custom2 and assign a permission to run it to the "db_executor" group. For a proper functionality of ALVAO applications, the function must receive the same parameters as the original functions and return the same columns.

Parameters

NameTypeDescription
@samplenvarchar(300)Searched string. The search proceeds in the path of the tree, object name, type, serial number, inventory number and asset number. If empty or NULL, the function returns only the assets entrusted to the requester. Otherwise, the function returns also objects that the user is authorized to see.
@nodeIdintID of the object currently selected. It will be shown as the first in the result.
@countintNumber of items in the return table.
@personIdintSigned-in user ID.
@requesterIdintID of the selected ticket requester.
@classIdsnvarchar(max)ID of object types that limit searching. If the value is NULL, all object types are being searched.

Return table

ColumnTypeDescription
DeviceIdintObject ID.
DeviceNamenvarchar(300)Displayed object name.
DeviceInfonvarchar(300)Displayed name in the menu during searching. Form: “object type: object name; inventory number, asset number, serial number".
DeviceIconIdintIcon ID.
DevicePathnvarchar(1024)Path to object in tree.
ItemOrderintThe value by which the result is sorted.

dbo.ftGetContextInfo

The function will return current data in the context of a database connection.

Return table

NameTypeDescription
PersonIdintUser ID (tPerson.iPersonId). If not set, the ID of the system user will be used instead.
DatedatetimeDate & time. If not set, the current date and time will be used.

dbo.ftLicHistRelations

The function to generate the list of links for the selected license.

Parameters

NameTypeDescription
@licHistIdint

Return table

ColumnTypeDescription
idint
LicHistRelationTypeIdint
ModifiedDatedatetime
ModifiedByPersonnvarchar(255)
Straightbit
BeginLicHistIdint
BeginLicHistRelationnvarchar(32)
BeginDteDatedatetime
BeginTxtLicNamenvarchar(255)
BeginLicenseCountint
BeginTxtProductNamenvarchar(255)
BeginTxtResellerCompanynvarchar(255)
BeginTxtLicTypenvarchar(255)
BeginTxtProductTypenvarchar(255)
BeginIntCurrentCountint
BeginIntAssignedCountint
BeginDteDateExpiredatetime
BeginTxtActivationKeynvarchar(1024)
BeginTxtInventoryNumnvarchar(255)
BeginTxtInvoicenvarchar(255)
BeginTxtLangnvarchar(255)
BeginBolDowngradebit
BeginTxtMemonvarchar(max)
EndLicHistIdint
EndLicHistRelationnvarchar(32)
EndDteDatedatetime
EndTxtLicNamenvarchar(255)
EndLicenseCountint
EndTxtProductNamenvarchar(255)
EndTxtResellerCompanynvarchar(255)
EndTxtLicTypenvarchar(255)
EndTxtProductTypenvarchar(255)
EndIntCurrentCountint
EndIntAssignedCountint
EndDteDateExpiredatetime
EndTxtActivationKeynvarchar(1024)
EndTxtInventoryNumnvarchar(255)
EndTxtInvoicenvarchar(255)
EndTxtLangnvarchar(255)
EndBolDowngradebit
EndTxtMemonvarchar(max)

dbo.ftLicHistSearch

The function to search for the license.

Parameters

NameTypeDescription
@samplenvarchar(300)
@licHistIdint
@countint

Return table

ColumnTypeDescription
LicHistIdint
LicHistInfonvarchar(300)
ItemOrderint

dbo.ftNodeRelations

Function that generates a list of links for the selected object with disabled tree rights.

Parameters

NameTypeDescription
@nodeIdint
@showHiddenbit

Return table

ColumnTypeDescription
idint
NodeRelationTypeIdint
BeginNodeIdint
BeginNodeRelationnvarchar(32)
BeginNodeKindnvarchar(255)
BeginNodeNamenvarchar(255)
BeginNodePathnvarchar(1024)
EndNodeIdint
EndNodeRelationnvarchar(32)
EndNodeKindnvarchar(255)
EndNodeNamenvarchar(255)
EndNodePathnvarchar(1024)
ThroughNodeIdint
ThroughRelationNamenvarchar(255)
Affectsbit
IsAffectedbit
CreatedDatedatetime
CreatedByPersonnvarchar(255)
RemovedDatedatetime
RemovedByPersonnvarchar(255)
Straightbit
Levelint

dbo.ftPersonFromLogin

Search person according to login name

Parameters

NameTypeDescription
@loginnvarchar(255)

Return table

ColumnTypeDescription
idint
Personnvarchar(255)
Loginnvarchar(255)
Emailnvarchar(255)
Pswdnvarchar(255)
Systembit
AccountDisabledbit
Hiddenbit
Guestbit
SIDnvarchar(255)
AdGuidnvarchar(255)

dbo.ftPersonSearchExtended

Extended search of persons across all system items.

Parameters

NameTypeDescription
@samplenvarchar(100)
@accountIdint
@guestbit
@personIdint

Return table

ColumnTypeDescription
PersonIdint
PersonInfonvarchar(300)
ItemOrderint

dbo.ftRelation

Linked ticket. The function is used to populate the fields in the dialog for updating selected links (@trId) on the Ticket links tab @ticketId.

Parameters

NameTypeDescription
@trIdint
@ticketIdint

Return table

ColumnTypeDescription
BeginHdTicketIdint
EndHdTicketIdint
TicketRelationTypeIdint

dbo.ftRelationsTypes

Types of links between tickets. The function is used to populate the link menu.

Parameters

NameTypeDescription
@localeIdint

Return table

ColumnTypeDescription
relIdDirint
BeginNamenvarchar(200)
EndNamenvarchar(200)
MenuOrderStrnvarchar(200)
LocalizedBeginNamenvarchar(200)
LocalizedEndNamenvarchar(200)

dbo.ftTicketsStateIntersectList

The intersection of statuses for @TicketIds tickets, which you can transition to from ticket statuses, with the exception to Resolved.

Parameters

NameTypeDescription
@TicketIdsnvarchar(200)

Return table

ColumnTypeDescription
idint
TicketStatenvarchar(64)
Orderint
TicketStateBehaviorIdint

dbo.ftTicketStateList

The list of statuses for the @TicketIds ticket, which you can transition to from the current status, with the exception to Resolved.

Parameters

NameTypeDescription
@TicketIdint

Return table

ColumnTypeDescription
idint
TicketStatenvarchar(64)
Orderint
TicketStateBehaviorIdint

dbo.ftTicketStateListIncResolved

The list of statuses for the @TicketIds ticket, which you can transition to from the current status.

Parameters

NameTypeDescription
@TicketIdint

Return table

ColumnTypeDescription
idint
TicketStatenvarchar(64)
Orderint
TicketStateBehaviorIdint

dbo.ftTicketStateMultiList

Function for the return of the intersection of possible states (including Solved/Closed) for multiple tickets.

Parameters

NameTypeDescription
@TicketIdsnvarchar(max)

Return table

ColumnTypeDescription
idint
TicketStatenvarchar(64)
Orderint
TicketStateBehaviorIdint

dbo.tfDay

Calendar of days starting with @Begin to @End (excluding).

Parameters

NameTypeDescription
@Begindatetime
@Enddatetime

Return table

ColumnTypeDescription
dDaydatetime

dbo.tfPersonManager

Direct managers.

Return table

NameTypeDescription
liPersonManagerSubordinatePersonIdint
liPersonManagerManagerPersonIdint

dbo.tfSplitString

The function divides the value based on a preset separator.

Parameters

NameTypeDescription
@stringnvarchar(max)
@splitCharnvarchar(1)

Return table

ColumnTypeDescription
wordnvarchar(1024)