How do I determine the value of a group custom field?

Hi guys :slight_smile:

I’m trying to write some code, to go through my groups, and pull out each
group name, along with the values of two group custom fields… and I’m
stuck on how to get the custom field values :frowning:

Here’s what I’ve got so far:

% use RT::Groups;
% my $Groups = new RT::Groups($session{‘CurrentUser’});

% $Groups->LimitToUserDefinedGroups();
% while(my $Group = $Groups->Next) {

<% $Group->Name %>

Thanks! :slight_smile:

  • David

Hi guys :slight_smile:

I’m trying to write some code, to go through my groups, and pull out each
group name, along with the values of two group custom fields… and I’m
stuck on how to get the custom field values :frowning:

Here’s what I’ve got so far:


% use RT::Groups;
% my $Groups = new RT::Groups($session{‘CurrentUser’});

% $Groups->LimitToUserDefinedGroups();
% while(my $Group = $Groups->Next) {

<% $Group->Name %>

See Record.pm, custom fields code now is generic and
find lib | xargs grep ‘^sub.*CustomField’


Thanks! :slight_smile:

  • David

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Buy your copy of our new book, RT Essentials, today!

Download a free sample chapter from http://rtbook.bestpractical.com

Best regards, Ruslan.

Thanks very much!

For future reference, I did it like this:

my $values = $Group->CustomFieldValues(‘my_custom_field_name’);
while (my $value = $values->Next) {
$content = $value->Content;
}

Hi guys :slight_smile:

I’m trying to write some code, to go through my groups, and pull out
each group name, along with the values of two group custom fields…
and I’m stuck on how to get the custom field values :frowning:

Here’s what I’ve got so far:


% use RT::Groups;
% my $Groups = new RT::Groups($session{‘CurrentUser’});

% $Groups->LimitToUserDefinedGroups();
% while(my $Group = $Groups->Next) {

<% $Group->Name %>

See Record.pm, custom fields code now is generic and find lib | xargs grep
’^sub.*CustomField’


Thanks! :slight_smile:

  • David

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com

Buy your copy of our new book, RT Essentials, today!

Download a free sample chapter from http://rtbook.bestpractical.com

Best regards, Ruslan.