Re: [Arsperl-users] ars_GetListEntry
Brought to you by:
jeffmurphy
|
From: Rusty C. <rco...@ya...> - 2009-04-13 19:09:30
|
Steve,
It's been a while since I used ARS but the help pages for ars_GetListEntry has missed an argument, plus I've always sucked the data into a hash. Here's my code snippet.
my %entries = ars_GetListEntry($ctrl->ctrl(), $schema, $lq, 0, 0,
[
{columnWidth=>20, separator=>'\t', fieldId=>$ftarca{"ARCT_T_WorkReq_"}},
],
$ftarca{"ARCT_T_WorkReq_"}, 2);
I've found that I always had to include the extra '0' in the call to make this work, sadly this is the simplest example I have.
Then I take those list of tickets and get the data I'm looking for
foreach my $t (sort keys %entries) {
# Grab the fields needed per ticket.
my %data = ars_GetEntry($ctrl->ctrl(), $schema, $t, $ftarca{"ARCT_I_Instructions"},
$ftarca{"ARCT_I_ActionTaken"}, $ftarca{"ARCT_I_SubmitCategory"},
$ftarca{"ARCT_TD_CreateDate"}, $ftarca{"ARCT_T_HCMinToComp_"},
$ftarca{"ARCT_TD_CreateWW"}, $ftarca{"ARCT_TD_ResolveWW"},
$ftarca{"ARCT_T_Region"} );
## <snip> ##
}
I'm sure there are better, more efficient ways to make this work, this is what I've done in the past.
Hope it helps,
Rusty
________________________________
From: Steve McDonald <Ste...@ch...>
To: ARSperl User Discussion <ars...@ar...>
Sent: Monday, April 13, 2009 11:21:23 AM
Subject: [Arsperl-users] ars_GetListEntry
Good morning
all,
I'm having problems
with my own code so tried the example and get this same
error:
/remedy/ARSperl-1.91/example] ars_GetListEntry.pl remedyDEV Demo demo
Testing: basic format.
ars_GetListEntry: [ERROR] GetListFields must be
an ARRAY reference (ARERR #80005) at ars_GetListEntry.pl line
54.
Line 54
is:
(@entries =
ars_GetListEntry($ctrl, $schema, $qual, 0))
ARSperl-1.91
SunOS
10
ARSystem
7.1
Thanks in
Advance!
Steve McDonald
Sr. Remedy Applications
Programmer
Choice Hotels
International
|