I'm still trying to get attachments working.  
 
What does this mean:
 
[ERROR] 'size' key does not map to scalar value. (ARERR #80025)
 
It happens as a result of this code:
 
 my $ctrl; my $schema = "HelpDesk-Data and Channel Management";
my %fldtab;
 
if(($name && $email && $phone && $code && $reqcat && $reqtyp && $desc) || 
$reqid) {
 $ctrl = ars_Login("suncoast", "dcm-web", "dcmweb");
 if(!$ctrl) { $err="Cannot login to remedy server - $ars_errstr"; }
 else {
  %fldtab = ars_GetFieldTable($ctrl, $schema);
  if(!%fldtab) { $err="Cannot get field table from remedy - $ars_errstr"; }
 }
}
 
if(!$err && $name && $email && $phone && $code && $reqcat && $reqtyp && $desc) {
 my @fields = ();
 push(@fields, 7, 0);
 push(@fields, 8, 'Submitted via web, please supply a proper description');
 push(@fields, 536870931, $code);
 push(@fields, 536871062, $name);
 push(@fields, 536871065, $phone);
 push(@fields, 536871067, $email);
 push(@fields, 536871089, $desc);
 push(@fields, 100000014, $reqcat);
 push(@fields, 100000039, $reqtyp);
 my @fieldids = (950000008,950000009,950000010,950001021);
 
 my $k;
 for $k($cgi->param) {
  if(substr($k,0,6) eq 'attach') {
   my $u=$cgi->upload($k);
   my $v=$cgi->param($k);
   $v=~m/^.*(\\|\/)(.*)/; # strip the remote path and keep the filename
   $v=$2;
   my @s=stat($v);
   my %f=(file => $u, name => $v, size => $s[7]);
   push(@fields, shift(@fieldids), \%f);
  }
 }
 $submittedreqid = ars_CreateEntry($ctrl, $schema, @fields);
 if(!$submittedreqid) { $err="Cannot create remedy ticket - $ars_errstr"; }
}

-------------------------------------------------------------------------
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