[rt-users] How to read asset info from AT

Matthew Keller kellermg at potsdam.edu
Fri Feb 23 17:42:28 EST 2007


off the top of my head:
 
my $AssObj = RTx::AssetTracker::Asset->new(RT->SystemUser);
$AssObj->Load($AssId);
my $AssCFs=$AssObj->CustomFields();
while(my $AssCF = $AssCFs->Next()) {
    print $AssCF->Name, ": ";
    my $AssValues=$AssObj->CustomFieldValues($AssCF->id);
    while($AssValues and my $assvalue = $AssValues->Next) {
	print $AssValue->Content,"\t";
    }
    print "\n";
}

Sorry for being such an Ass. 

LOL... TGIF, folks. :)


On Fri, 2007-02-23 at 17:16 -0500, Tomasz Wlodek wrote:
> Hi,
> 
> I know that this is RT mailing list, not AT, but since AT www site is 
> down, and since many of RT users use AT, I thought some of you may be able 
> to help me.
> 
> I want to run a perl script which will loop over assets and print all 
> custom fields values for each asset.
> 
> This is a super trivial problem for an expert, just a few lines of Perl, I 
> know. But if you are not an expert you would like to see and example how 
> this is done, to get you started.
> 
> Could anyone help me with that?
> 
> Tom
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> 
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
> 
> 
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
> Buy a copy at http://rtbook.bestpractical.com




More information about the rt-users mailing list