GetAlarmsListExt

Fetch list of set/generated alarms                         

GetAlarmsListExt(

ByVal ObjectIndex                            As Long,  

ByVal ObjectType                            As String,

ByVal DocumentType                       As String,

ByVal GetAllForUser                        As String,

ByVal UserIndex                              As Long,  

ByVal InformMode                           As String,

ByVal AlarmCountOnly                    As String,

ByVal AlarmGenerated                    As String,

ByVal LastAlarmIndex                     As Long,  

ByVal FetchCount                           As Long,  

ByRef AlarmCount                          As Long,  

ByRef TotalNoOfRecords                As Long,  

ByRef Alarms() As Byte)                 As Long

 

Parameters  

In/out

Name

Data type

Description

In

ObjectIndex

Long

Index of object for which alarms are being fetched

In

ObjectType

String

Type of object ,Document or Folder

In

DocumentType

String

Type of Document

In

GetAllForUser

String

Helps in taking decision of types of alarms to be fetched

In

UserIndex

Long

Index of the User

In

InformMode

String

Whether mail or popup or both

In

AlarmCountOnly

String

Whether alarms or just count only

In

AlarmGenerated

String

Helps in taking decision of types of alarms to be fetched

In

LastAlarmIndex

Long

Index of last alarms previously fetched

In

FetchCount

Long

Count for fetching in batches

Out

AlarmCount

Long

Total alarms returned in this call

Out

TotalNoOfRecords

Long

Shows whether more alarms remaining

Out

Alarms

Byte[TagAlarm]

Alarms information

 

Description

This function is called in shared cabinet only in desktop. Here is a table for various combinations - Possible for fetching.

GetAllForUser    Alarmgenerated      Fetch

 Y                                 Y          All alarms generated for user

 Y                                  N         All alarms for the user which have not  generated

 Y                                  “”         All alarms for the user (whether generated or not)

 N                                  Y         All alarms set by the user which have been generated

 N                                  N         All alarms set by the user but not generated

 N                                  “ “        All alarms set by the user

When GetallForUser is set blank UserId has to blank which means user is supervisor.                       If in the return value TotalNoOfRecords is greater then AlarmCount then this means that More alarms are there to fetched in this criteria. InformMode is set to “M” for mail,”P” for Popup and “B” for both.

Return value 

Name

Description

NG_SUCCESS

In case of success

-3

Cabinet not connected

-4

Invalid operation

-201

Insufficient rights for the current operation

-133

User not logged in

 

Example

Dim  ObjectIndex             As Long

Dim  ObjectType              As String

Dim   DocumentType        As String

Dim  GetAllForUser          As String

Dim  InformMode             As String

Dim  AlarmCountOnly      As String

Dim  AlarmGenerated      As String                             

Dim  AlarmCount            As Long

Dim TotalNoOfRecords   As Long

Dim Alarms()                 As Byte

Dim lRetVal                   As Long

ObjectIndex = 12

ObjectType = “D”

DocumnetType = “”

GetAllForUser = “N”

InformMode = “P”

AlarmCountOnly=””

AlarmGenerated =”N”

lRetVal=gPDb(miCurCabId).GetAlarmaListExt(ObjectIndex,ObjectType,DocumentType,GetAllForUser,0,nformMode,AlarmCountOnly,AlarmGenerated,0,5,AlarmCount,TotalNoOfRecords,Alarms)

  If lRetVal <> NG_SUCCESS Then

        MsgBox gPDb(miCurCabId).ErrDescription, vbInformation

        Screen.MousePointer = vbNormal

        Exit Sub

End if