Paul,
 
One thing to beware is that the keys of the hash GFT returns (%f in your 
example) are the *internal* names of the fields and may not match the names 
shown in the GUI (e.g. sometimes you might have a field shown as "Ticket 
Number" externally and "Ticket #" internally). SO -- I suggest you dump the 
contents of the hash that GFT returns (using Data::Dumper for example) to find 
the "real" names of the fields you need.
 
Good Luck!
 
Richard.
 



To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 3 Sep 2008 10:03:36 
+1100Subject: Re: [Arsperl-users] FieldID ?Thanks for the info, Could I request 
Jeff to update the example on that page , also can you include a example to 
retrieve a bunch of fields for display please. Note I now have the following 
snippet: == %f = ars_GetFieldTable($ctrl, $SCHEMA); # Retrieve all of the 
entry-id's for the schema. ( @entries = ars_GetListEntryWithFields(             
         $ctrl, $SCHEMA, $qual, 10,0,                 [                    
$f{'Trouble Ticket #'},                    $f{'Create date'}                 ], 
.. === which produces: Use of uninitialized value in subroutine entry at 
dump_tt.pl line 48. GLEWF Failed: [ERROR] One of the structures in the list of 
fields to display in the query list is invalid () (ARERR #214) at dump_tt.pl 
line 48. I assume this is because I still don't understand the structure 
enough.. Is this the best way to retrieve alot of fields from a specific form, 
ie should I specific each field or just try and get ALL fields ? I would like 
to use which ever is more efficent, unless it doesn't matter. Thanks Paul Wilson



Richard Hellier <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 
02/09/2008 05:13 PM 




Please respond toARSperl User Discussion <arsperl-users@arsperl.org>





To
ARSperl User Discussion <arsperl-users@arsperl.org> 


cc



Subject
Re: [Arsperl-users] FieldID ?




Paul,Several points:1) Looks like there is a typo on the 
page:http://www.arsperl.org/manual/ars_GetListEntryWithFields.html in 
that:FieldID("foo")should be:FieldID{"foo"} etc.And you need to make the same 
change in your code.2) Where does FieldID come from, as you ask?  First you 
must call ars_GetFieldTable(), e.g.my %FieldID = ars_GetFieldTable($ctrl, 
$SCHEMA);FieldID is then a hash whose keys are the names of the fields and the 
values are the corresponding numeric ids (See 
http://www.arsperl.org/manual/ars_GetFieldTable.html)3) Have you missed one of 
the arguments to ars_GetListEntryWithFields()? After the first three arguments 
($ctrl, $SCHEMA, $qual in your example), you'd normally have two integer 
arguments (maxRetrieve, firstRetrieve).Cheers,Richard.

To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Tue, 2 Sep 2008 15:55:45 
+1100Subject: [Arsperl-users] FieldID ?I'm triying to find the best API to 
retireve fields from a couple of Forms I've copied the example for 
(ars_GetListEntryWithFields)  : 
http://www.arsperl.org/manual/ars_GetListEntryWithFields.html but its failing 
as follows: ARSperl-1.82: $ perl -Iblib/arch -Iblib/lib  dump_tt.pl Undefined 
subroutine &main::FieldID called at dump_tt.pl line 46. Here is my snipet of 
code: ( @entries = ars_GetListEntryWithFields(                            
$ctrl, $SCHEMA, $qual, 20,                            [   FieldID("Trouble 
Ticket #"),                                FieldID("Short Description"),        
                        FieldID("Business Support Group"),                      
          FieldID("Client Company Name"),                                
FieldID("Create date")                            ],                            
    FieldID("Create date"), 1 ) )         || die( "GLEWF Failed: $ars_errstr" 
); Is FieldID apart of ARSPerl or inbuilt in another Perl module? Thanks Paul 

Try Facebook in Windows Live Messenger! Try it 
Now!-------------------------------------------------------------------------This
 SF.Net email is sponsored by the Moblin Your Move Developer's challengeBuild 
the coolest Linux based applications with Moblin SDK & win great prizesGrand 
prize is a trip for two to an Open Source event anywhere in the 
worldhttp://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________Arsperl-users
 mailing [EMAIL PROTECTED]://lists.sourceforge.net/lists/listinfo/arsperl-users
_________________________________________________________________
Make a mini you and download it into Windows Live Messenger
http://clk.atdmt.com/UKM/go/111354029/direct/01/
-------------------------------------------------------------------------
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