Title: Trouble with using AR System .NET API version 1.2.1761.15495
**

Peter,

 

Qualifications in .NET API are SQL-like and are of same format/grammar as that of AR System Advanced Query bar in User Tool. One exception being User Tool handles qualifications expressed in terms of Field screen labels, where as other typical API programs including the .NET API work fool-proof way when qualifications are expressed in terms of field ids or field DB names (not the display labels).

 

Following are 3 example qualifications:

 

‘11111’ = 2

‘SomeFieldName’ > 3 AND ‘11111’ LIKE “%David%”

‘11111’ < ($TIMESTAMP$ - (2 * 24 * 60 * 60))

 

Where 11111 is a field id; SomeFieldName is the DB name of a field. As you can see field id/names are single quoted, string values are double quoted, the qualification can include computational expressions (like 2 * 24…), can use AR supported keywords (with the syntax of  $XXX$) and several conditions can be combined using AND/OR/NOT etc operators to build more complex qualifications.

 

For comprehensive details on AR System qualifications, please refer to AR System documentation.

 

Hope this helps.

 

Regards

Appajee

 


From: Action Request System discussion list(ARSList) [mailto:[email protected]] On Behalf Of Anthony K R
Sent: Thursday, August 10, 2006 11:42 PM
To: [email protected]
Subject: Re: Trouble with using AR System .NET API version 1.2.1761.15495

 

Peter,

 

Refer .NET API help doc (it must be there in the installation pack).

 

 

Here is the sample code snippet from it; 

[C#]

ARSystem.EntryListFieldList entryListFieldList = new ARSystem.EntryListFieldList();
entryListFieldList.AddField(8, 50, "");
ARSystem.EntryListFieldValueList entryListFieldValues = server.GetListEntryWithFields(formName, "'Short Description' LIKE \"A%\"", entryListFieldList, 0, 0);
foreach (ARSystem.EntryListFieldValue entry in entryListFieldValues)
{
    Console.WriteLine(entry.EntryId.ToString());
    foreach (uint field in entry.FieldValues.Fields)
    {
        Console.WriteLine("Field " + field + ":" + entry.FieldValues[field]);
    }
}

[_vbscript_]

Dim entryListFieldList
Set entryListFieldList = CreateObject("ARSystem.EntryListFieldList")
entryListFieldList.AddField 8, 50, ""
Dim entryListFieldValues
Set entryListFieldValues = server.GetListEntryWithFields_3(formName, "'Short Description' LIKE ""A%""", entryListFieldList, 0, 0)
Dim entry
For Each entry in entryListFieldValues
    WScript.Echo entry.EntryId.ToString()
    Dim field
    For Each field In entry.FieldValues.Fields
        WScript.Echo "Field " & CLng(field) & ":" & entry.FieldValues.Item(field)
    Next
Next

Regards,

Anthony

 


From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Lammey, Peter A.
Sent: Thursday, August 10, 2006 7:39 PM
To: [email protected]
Subject: Re: Trouble with using AR System .NET API version 1.2.1761.15495

**

We have been able to isolate the issue to a parameter being passed to the function that retrieves the data from Remedy. Once we established an object indicating all the fields we wanted returned, everything worked as desired.

 

However, we are having trouble determining how to qualify search criteria in the syntax of the .NET API (such as searching for tickets where 'Status' = "Assigned" as an example.

 

Can you offer any sample code that performs a search with qualification?

Thanks
Peter Lammey
ESPN MIT Technical Services & Applications Management
860-766-4761

 

__20060125_______________________This posting was submitted with HTML in it___ __20060125_______________________This posting was submitted with HTML in it___

Reply via email to