Please look at this for details of Diary fields:

http://arsperl.sourceforge.net/manual/ds_diaryentry_hash.html

This might also be of some help, but it is how to construct a Diary
entry and not how to read it.
http://arsperl.sourceforge.net/manual/ars_EncodeDiary.html


Here is a snip of some code I wrote a long time ago... (5+ years) so
it might help, but might need a bit of updating too.
##
# Get the field map for the selected diary form
##
(%diary_field_form_fields = ars_GetFieldTable($pri,
$diary_field_form)) || die "Error in GetFieldTable for
$diary_field_form\n";
foreach $field_name (@diary_form_fields_names){
        if ($diary_field_form_fields{$field_name}){
                push (@diary_form_fields_ids,
$diary_field_form_fields{$field_name});
        }else{
                die "You said $field_name was in form
$diary_field_form, but I did not find it!\nUpdate your settings for
[EMAIL PROTECTED]";
        }
}
my %vals = ars_GetEntry(...)
##
# Process each diary entry
##
# I am taking the hash entry from vals(by fieldname via the
diary_field_form_fields array constructed above)
#  and turning it into an anonymous array so that the foreach can loop
over them.
foreach $diary_entry (@{$vals{$diary_field_form_fields{"Work Log"}}}){
        # then I get values from each of the Diary entries like this....
        $diary_entry->{value};
        $diary_entry->{timestamp};
        $diary_entry->{user};
}

Hope that helps.

-- 
Carey Matthew Black
Remedy Skilled Professional (RSP)
ARS = Action Request System(Remedy)

Love, then teach
Solution = People + Process + Tools
Fast, Accurate, Cheap.... Pick two.



On Tue, Aug 12, 2008 at 6:12 AM, Tarakad Raghavan Viswanathan (KIRK
21) <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> Im trying to print "Work Log" and Im getting ARRAY(0xa68d70) instead of the
> value.
>
> Can someone advice please.  The displayorder contains the fields I want to
> print.  All fields print ok except the Work Log
>
>    foreach $ticket ( sort keys %tickets ) {
>                 (%v_tick = ars_GetEntry($$ctrl, $schema, $ticket)) || die
> "$ars_errstr - can't get $ticket from schema $schema";
>
>                 my $curline;
>                 foreach $id ( @displayorder ) {
>                         $curval=$v_tick{$f_tick{$id}};
>                         if ( $t{$id} eq "enum" ) {
> $tmp=getEnumValue($id,$curval); $curval=$tmp;}
>                         if ( $t{$id} eq "time" && $curval > 0 ) { $tmp=`perl
> -le 'print scalar localtime $curval'`; $curval=UnixDate($tmp,"%m/%d/%Y
> %T");}
>
>                         $curval=~ s/\n/ /g;  # Replace New line with space
>                         $curval=~ s/^M/ /g;  # Replace Control M with space
>                         $curval=~ s/,/ /g;  # Replace Comma with space
>                         $curline.="$curval,";
>                         #print "$curval,";
>                 }
>                 printoutput "$curline";
>           }
>
> Regards,
> Vishi

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Arsperl-users mailing list
Arsperl-users@arsperl.org
https://lists.sourceforge.net/lists/listinfo/arsperl-users

Reply via email to