Re: [Arsperl-users] ARSPerl newbie: How to list field values from a form?
Brought to you by:
jeffmurphy
|
From: Clayton S. <cla...@gm...> - 2007-08-09 18:28:23
|
Using "die" is just an example.
You could also "warn" and continue, or whatever you want.
Just check the value of $ars_errstr.
if ($ars_errstr){
# do what you need to do if there is an error
}
On 8/9/07, Jarl Gr=F8neng <jar...@gm...> wrote:
> I does not like the die parameter if you got an error. You may miss
> the clean-up part.
>
> -
> Jarl
>
> On 8/9/07, Thilo Stapff <thi...@ap...> wrote:
> > ars_GetListEntry needs at least one more parameter (firstRetrieve,
> > usually =3D 0):
> >
> > %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0 , 0);
> >
> > instead of
> >
> > %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0);
> >
> >
> > Moreover, you should always check for errors after calling an API
> > function, e.g.
> >
> > die "ars_GetListEntry( $schema, $qs ): $ars_errstr\n" if $ars_errstr=
;
> >
> >
> > You might also try using the field ID of "Category" instead of the fiel=
d
> > name in the qualifier string.
> >
> >
> > Regards,
> > Thilo Stapff
> >
> >
> > Ravi wrote:
> > > Hi:I am trying query a schema and print a fieldname and values for al=
l
> > > records with a qualifying filter. I can't seem to figure out which
> > > function to use and how. This is what I have now and I get 0 records.=
Is
> > > asr_GetListEntry the right function? Does someone have a sample scrip=
t
> > > or point me to the right one in the example dir?
> > >
> > > $schema =3D "My:Alarm Base";
> > > $qs =3D qq/'Category' =3D "Voice"/;
> > > ($qual =3D ars_LoadQualifier($ctrl,$schema,$qs)) ||
> > > die "error in ars_LoadQualifier";
> > >
> > > %entries =3D ars_GetListEntry($ctrl, $schema, $qual, 0);
> > >
> > > foreach $entry_id (sort keys %entries) {
> > > printf("%s %s\n", $entry_id, $entries{$entry_id});
> > > }
> > >
> > >
> > > Thanks
> > > Ravi
> > >
> > >
> > > ---------------------------------------------------------------------=
----
> > > 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 browse=
r.
> > > 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
> > >
> >
> >
> > -----------------------------------------------------------------------=
--
> > 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
> >
>
> -------------------------------------------------------------------------
> 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
>
--=20
Clayton Scott
cla...@gm...
|