Re: [Arsperl-users] One question
Brought to you by:
jeffmurphy
|
From: jeff m. <jcm...@je...> - 2011-02-18 17:58:20
|
Some like this might work
# grab the qualifier hash ref
my $h = $menustruct->{'qualifier'};
# look down into the hash and replace { 'queryCurrent' => [fieldid] } occurrences with a { datatype => , value => } as appropriate.
# you need to write this part
# turn it into a QualifierStruct
my $q = ars_qualifier_struct($ctrl, $h);
# use ars_GetListEntry(...) to fetch the menu values for the 'labelField' and 'valueField'
On Feb 18, 2011, at 7:44 AM, Hicham Chiker wrote:
> Hello arsperl communauty,
>
> I have a single question :
>
> Is it possible through ARSperl to populate a menu that should be the result of a query ?
>
> Here are the information of my system
>
> 1. OS (operating system) version (example: RHEL 4)
> Debian Version 4.0
> 2. Perl version (output from perl -v)
> Perl v5.8.8
> 3. ARSystem version you are connecting to (example: 6.3)
> ARSystem 6.00.01
> 4. API version you compiled against (example: 7.0)
> API9
> 5. ARSperl version (example: 1.91)
> 1.91
>
> Here is the stucture of the menu
>
> 'owner' =>'abc';
> 'name' => 'AC-LAC';
> 'refreshCode' => 'open';
> 'menuType' => 'query';
> 'menuQuery'=> {
> 'labelField' => [
> 8,
> 536870918,
> 536870922,
> undef,
> undef
> ],
> 'qualifier' => {
> 'left' => {
> 'left' => {
> 'left' => {
> 'oper' => 'rel_op',
> 'rel_op' => {
> 'left' => {
> 'fieldId' => 7
> },
> 'right' => {
> 'dataType' => 'enum',
> 'value' => 1
> },
> 'oper' => '=='
> }
> },
> 'right' => {
> 'oper' => 'rel_op',
> 'rel_op' => {
> 'left' => {
> 'fieldId' => 536870920
> },
> 'right' => {
> 'queryCurrent' => 536871238
> },
> 'oper' => '=='
> }
> },
> 'oper' => 'and'
> },
> 'right' => {
> 'left' => {
> 'oper' => 'rel_op',
> 'rel_op' => {
> 'left' => {
> 'fieldId' => 910000009
> },
> 'right' => {
> 'dataType' => 'char',
> 'value' => 'ALL'
> },
> 'oper' => '=='
> }
> },
> 'right' => {
> 'oper' => 'rel_op',
> 'rel_op' => {
> 'left' => {
> 'fieldId' => 910000009
> },
> 'right' => {
> 'queryCurrent' => 910000009
> },
> 'oper' => '=='
> }
> },
> 'oper' => 'or'
> },
> 'oper' => 'and'
> },
> 'right' => {
> 'left' => {
> 'oper' => 'rel_op',
> 'rel_op' => {
> 'left' => {
> 'fieldId' => 536870919
> },
> 'right' => {
> 'queryCurrent' => 536871048
> },
> 'oper' => '=='
> }
> },
> 'right' => {
> 'oper' => 'rel_op',
> 'rel_op' => {
> 'left' => {
> 'fieldId' => 536870919
> },
> 'right' => {
> 'dataType' => 'null',
> 'value' => undef
> },
> 'oper' => '=='
> }
> },
> 'oper' => 'or'
> },
> 'oper' => 'and'
> },
> 'sortOnLabel' => 1,
> 'server' => '@',
> 'valueField' => 536870913,
> 'schema' => 'CAC'
> };
>
>
>
> Thank you very much for any help !!
>
> M Chiker
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
>
> --
> Arsperl-users mailing list
> Ars...@ar...
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
|