Thread: [Arsperl-users] Problem with 7.x enum list with gaps (was: Re: Errors opening a form)
Brought to you by:
jeffmurphy
|
From: Michiel B. <mic...@gm...> - 2007-08-25 12:49:01
|
---------- Forwarded message ---------- From: Michiel Beijen <mic...@gm...> Date: Aug 25, 2007 2:34 PM Subject: Problem with 7.x enum list with gaps (was: Re: [Arsperl-users] Errors opening a form) To: ARSperl User Discussion <ars...@ar...> I guess I also ran into a problem with the 7.x Enum field when it contains gaps and I have attached a .def file and a perl script to explain it. The list of enum values that is returned when you do an ars_GetField call on a enum field with gaps between the values is empty. Regards, Michiel On 8/22/07, Jeff Murphy <jcm...@je...> wrote: > Peter Farr wrote: > > Damn! I do not have any control over the Remedy side so I doubt there is > > anything I can do about it. Every time I start to use ARSPerl it throws up > > another roadblock. > > > > Thanks for the reply, Jarl. > > > > Make a simple form, if you can, that duplicates the problem and submit > the form definition and script. We can then look into adding that > functionality. > > jeff > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Arsperl-users mailing list > Ars...@ar... > https://lists.sourceforge.net/lists/listinfo/arsperl-users > -- Met vriendelijke groet / Kind regards Michiel Beijen ______________________________________________________ MANSOLUTIONS Energieweg 60-62 3771 NA Barneveld The Netherlands Tel. +31-(0)612968592 Mail mic...@ma... Internet http://bsm.mansolutions.nl |
|
From: Thilo S. <thi...@ap...> - 2007-08-27 08:38:40
|
For the 'Enum With Gaps' field, you have to use
$field->{limit}{enumLimits}{customList}
instead of
$field->{limit}{enumLimits}{regularList}
Regards,
Thilo
Michiel Beijen wrote:
> Excuse me, here is my message one more time. sf.net keeps sending
> messages to me that they've blocked and removed .zip and .pl
> attachments.
>
> I guess I also ran into a problem with the 7.x Enum field when it
> contains gaps and I have attached a .def file and a perl script to
> explain it.
> The list of enum values that is returned when you do an ars_GetField
> call on a enum field with gaps between the values is empty.
>
> Regards,
>
> Michiel
>
> Here's the perl script:
>
> ---------
> use ARS;
> use strict;
> use warnings;
> use Data::Dumper;
>
> my $ctrl = ars_Login( shift, shift, shift )
> || die "login: $ars_errstr";
>
> my $schema = "MB:Test";
>
> foreach ('Conventional Enum', 'Enum With Gaps') {
> print "Fetching values for $_\n";
> ( my $fid = ars_GetFieldByName( $ctrl, $schema, $_ ) ) || die $ars_errstr;
> ( my $field = ars_GetField( $ctrl, $schema, $fid ) ) || die $ars_errstr;
> print Dumper ( @{ $field->{limit}{enumLimits}{regularList} } );
> my @enumvals = @{ $field->{limit}{enumLimits}{regularList} };
> print "Status values $_: " . join( ',', @enumvals ) . "\n";
> }
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
|
|
From: Michiel B. <mic...@gm...> - 2007-08-27 11:15:56
|
Ah! I see.
That is a bit confusing, but yes, it works...
Thanks!
--
Michiel
On 8/27/07, Thilo Stapff <thi...@ap...> wrote:
> For the 'Enum With Gaps' field, you have to use
>
> $field->{limit}{enumLimits}{customList}
>
> instead of
>
> $field->{limit}{enumLimits}{regularList}
>
>
>
> Regards,
> Thilo
|
|
From: Michiel B. <mic...@gm...> - 2007-08-26 08:32:36
Attachments:
enum.def
|
Excuse me, here is my message one more time. sf.net keeps sending messages to me that they've blocked and removed .zip and .pl attachments. I guess I also ran into a problem with the 7.x Enum field when it contains gaps and I have attached a .def file and a perl script to explain it. The list of enum values that is returned when you do an ars_GetField call on a enum field with gaps between the values is empty. Regards, Michiel Here's the perl script: --------- use ARS; use strict; use warnings; use Data::Dumper; my $ctrl = ars_Login( shift, shift, shift ) || die "login: $ars_errstr"; my $schema = "MB:Test"; foreach ('Conventional Enum', 'Enum With Gaps') { print "Fetching values for $_\n"; ( my $fid = ars_GetFieldByName( $ctrl, $schema, $_ ) ) || die $ars_errstr; ( my $field = ars_GetField( $ctrl, $schema, $fid ) ) || die $ars_errstr; print Dumper ( @{ $field->{limit}{enumLimits}{regularList} } ); my @enumvals = @{ $field->{limit}{enumLimits}{regularList} }; print "Status values $_: " . join( ',', @enumvals ) . "\n"; } |