Hi George;

it depends on what application you actually use on top of AR System.
For Remedy ITSM 5 and 6; the categorizations are stored in the
SHR:Categorization form (or "schema" as it is called in the API)..
Make your qualification search for something like Status = Active AND
(Keyword = All OR Keyword =  Change)
This was from the top of my head; please double check the field names.
I usually first create my search in the User Tool and then use that to
create my Perl script.

See the next snippet for an idea of how to retrieve records from a
form using ARSPerl.

use ARS;
use strict;
use warnings;
use Data::Dumper;

if ( $#ARGV < 2 ) {die "usage: ars_GetListEntry.pl server username
password \n";}

# Log in to the server
my $ctrl = ars_Login(shift, shift, shift)
        || die "login: $ars_errstr";

# In this test case we're only interested in the user form and the two
fields login name and license type on those:
my $schema = "User";
my $login_name = "Login Name";
my $lic_type = "License Type";

# Create a nice hash with fieldname - ID pairs for easy reference
(my %fieldname_to_id = ars_GetFieldTable($ctrl, $schema)) ||
    die "ars_GetFieldTable: $ars_errstr";
        
# Create a qualifier string with condition 1=1 , this will show all records.
my $qualification = ars_LoadQualifier($ctrl, $schema, "(1 = 1)") ||
    die "ars_LoadQualifier: $ars_errstr";

# use a GetListEntry call to retrieve the entries for this
qualification; specify the fields we're interested in

my @entries = ars_GetListEntry($ctrl, $schema, $qualification, 0, 0,
                                # getListFields
                                [
                                  {columnWidth=>15, separator=>' ',
fieldId=>$fieldname_to_id{$login_name} },
                                  {columnWidth=>15, separator=>' ',
fieldId=>$fieldname_to_id{$lic_type}  }
                                ],
                                # sort Order
                                $fieldname_to_id{$login_name}, 1);
# Log off nicely.
ars_Logoff($ctrl);
print Dumper (@entries);
exit 0;


On 9/25/07, George <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to list the available Category, Type and Item fields which
> are available in my change tickets.
>
> I'm having trouble figuring this out.  Could somebody assist by pointing
> me to the correct function/documentation or if you could lend me some
> code, that would be great :)
>
> Thanks in advance,
>
> George
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Arsperl-users mailing list
> Arsperl-users@arsperl.org
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>


-- 
Met vriendelijke groet / Kind regards
Michiel Beijen
______________________________________________________
MANSOLUTIONS
Energieweg 60-62
3771 NA Barneveld
The Netherlands
Tel. +31-(0)612968592
Mail [EMAIL PROTECTED]
Internet http://bsm.mansolutions.nl

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Arsperl-users mailing list
Arsperl-users@arsperl.org
https://lists.sourceforge.net/lists/listinfo/arsperl-users

Reply via email to