Skip to main content

Scalar functions

dbo.DefaultSlaId

Returns the default SLA for on-duty requesters.

Parameters

NameTypeDescription
@iHdSectionIdint
@iPersonIdint

dbo.fAddressString

Formats the address properties from tAddress to one string.

Parameters

NameTypeDescription
@addressIdint

dbo.fDate

Returns date without time only.

Parameters

NameTypeDescription
@datetimedatetime

dbo.fDateHoursMinutes

Cut-off of seconds from date and time records.

Parameters

NameTypeDescription
@ddatetime

dbo.fDeadline

Calculates deadline in the service operating hours.

Parameters

NameTypeDescription
@liOpeningHoursint
@dFromdatetime
@nHoursfloat

dbo.fHtmlString

Encodes a string as valid HTML, including ends of lines.

Parameters

NameTypeDescription
@snvarchar(4000)

dbo.fIsAfterDeadline

Checks whether the actual moment is after the deadline in the service operating hours.

Parameters

NameTypeDescription
@liOpeningHoursint
@dFromdatetime
@nHoursfloat

dbo.fLastLevelDomain

Returns the last level of the domain.

Parameters

NameTypeDescription
@LoginWithDomainnvarchar(255)

dbo.fnCheckRelCycles

Checks the circular task link between tickets.

Parameters

NameTypeDescription
@trIdint
@ticketBeginint
@ticketEndint
@relTypeIdint

dbo.fnCheckRelCyclesLicHist

Function for reviewing a circular task.

Parameters

NameTypeDescription
@nrIdint
@beginLicHistIdint
@endLicHistIdint
@relTypeIdint

dbo.fnCheckRelCyclesNode

Function for reviewing a circular task.

Parameters

NameTypeDescription
@nrIdint
@beginNodeIdint
@endNodeIdint
@relTypeIdint

dbo.fnCheckRelDuplicity

Checks the link between tickets for duplicity.

Parameters

NameTypeDescription
@trIdint
@ticketBeginint
@ticketEndint
@relTypeIdint

dbo.fnCheckRelOneToMany

Checks whether the ticket has maximum one link of the 1:N type.

Parameters

NameTypeDescription
@trIdint
@ticketBeginint
@ticketEndint
@relTypeIdint

dbo.fnCreateColumnName

Transforms the string to usable string for database column name.

Parameters

NameTypeDescription
@strnvarchar(255)Any string to the transgform.

dbo.fnCutSymbolsFromQuery

Returns a string without unnecessary symbols.

Parameters

NameTypeDescription
@samplenvarchar(max)

dbo.fnFileStringInfoCsvSignature

CSV file signature from FileStringInfo part.

Parameters

NameTypeDescription
@idint

dbo.fnFindAssetUserFromPerson

According to PersonId of the user in Administration, NodeId finds the user in the objects tree in AM.

Parameters

NameTypeDescription
@personIdint

dbo.fnFloatHourToTimeString

Converts the value of hours from a floating point number into a text string in the h:mm format.

Parameters

NameTypeDescription
@hoursfloat

dbo.fnFloatToCharExactLength

The function returns a number (float) as a string with the set minimum length of the integer part and the maximum length of the fractional part, which is guaranteed by completing with zeroes, or rounding where applicable. The maximum length is 50, which is an appropriately selected constant.

Parameters

NameTypeDescription
@valuefloat
@intLenint
@decLenint

dbo.fnGetBackupKindName

Suffix of properties with original data in which the conversion to another data type failed.

Parameters

NameTypeDescription
@intKindIdint

dbo.fnGetDateDiffInOpeningHours

Custom difference in hours between two dates in given operating hours.

Parameters

NameTypeDescription
@fromdatetimeDate from (UTC)
@todatetimeDate until (UTC)
@openingHoursIdintIdentifier for operating hours

dbo.fnGetNextSectionId

Parameters

dbo.fnGetNextTicketId

Function returns id of newly created ticket.

Parameters

dbo.fnGetSlaByImpactUrgency

Finds best SLA for a given requester and service based on impact and urgency items.

Parameters

NameTypeDescription
@impactColumnValueIdintImpact ID, value iColumnValueId from table tColumnValue.
@urgencyColumnValueIdintUrgency ID, value iColumnValue from table tColumnValue
@hdSectionIdintService ID
@requesterPersonIdintRequester ID

dbo.fnGetUnreadCount

Number of unread events of the person on ticket.

Parameters

NameTypeDescription
@PersonIdint
@TicketIdint

dbo.fnHdSectionWithoutLast

The function returns the full service name (path) excluding the name of the service

Parameters

NameTypeDescription
@SectionIdint

dbo.fnLastLocalMidnightUtc

The calculation of the last local midnight according to UTC time and the time zone.

Parameters

NameTypeDescription
@utcdatetime
@tzuidnvarchar(128)

dbo.fnLocalTime

Converts UTC data to the specific time zone.

Parameters

NameTypeDescription
@utcdatetime
@tzuidnvarchar(128)

dbo.fnLocalTimeString

Converts UTC data to the specific time zone and returns as a string formated in specified language.

Parameters

NameTypeDescription
@utcdatetime
@tzuidnvarchar(128)
@localeIdint

dbo.fnNextLocalMidnightUtc

The calculation of the following local midnight according to UTC time and the time zone.

Parameters

NameTypeDescription
@utcdatetime
@tzuidnvarchar(128)

dbo.fnPersonLoginWithoutDomain

Username of a person without a domain.

Parameters

NameTypeDescription
@sPersonLoginnvarchar(255)

dbo.fnReportedTime

The calculation of time reported on the selected day and for the selected employee.

Parameters

NameTypeDescription
@utcdatetime
@tzuidnvarchar(128)
@personIdint

dbo.fnStartWorkTime

The calculation of the time at which the selected employee began working on the selected day.

Parameters

NameTypeDescription
@utcdatetime
@tzuidnvarchar(128)
@personIdint

dbo.fnTimeZoneOffset

Returns the deviation in hours and minutes of the time zone from UTC at a given time.

Parameters

NameTypeDescription
@utcdatetimeTime in UTC.
@tzuidnvarchar(128)Time zone identifier, see dbo.TimeZone.uid.

dbo.fnTodayHour

Converts a floating point number into the item type date and time where date is today's date and time is transferred from the parameter.

Parameters

NameTypeDescription
@hourfloat

dbo.fnUtcTime

UTC time calculated from the local time and time zones.

Parameters

NameTypeDescription
@localdatetime
@tzuidnvarchar(128)

dbo.fnWorkTimeAtDay

The calculation of the worked on the selected day for the selected employee.

Parameters

NameTypeDescription
@utcdatetime
@tzuidnvarchar(128)
@personIdint

dbo.fnWorkTimeToday

The calculation of the time at which the selected employee began working on the selected day. The calculation does not consider the end of the day, only up to "now"

Parameters

NameTypeDescription
@utcdatetime
@tzuidnvarchar(128)
@personIdint

dbo.fRelatedCompany

Ticket - "Related Organizations" item

Parameters

NameTypeDescription
@iHdTicketIdint

dbo.fStripDomain

Username of a user without a domain.

Parameters

NameTypeDescription
@LoginWithDomainnvarchar(255)

dbo.fSuggestResolutionDate

Default due date by SLA.

Parameters

NameTypeDescription
@Ticketidint

dbo.GetProperty

Returns 1 value from the tProperty table based on the set code.

Parameters

NameTypeDescription
@keynvarchar(255)