ARS-Simple

 view release on metacpan or  search on metacpan

html/Simple.html  view on Meta::CPAN


<dt id="server">server</dt>
<dd>

<p>The name (or possibly IP Address) of the Remedy ARSystem server you wish to connect to.</p>

</dd>
<dt id="user">user</dt>
<dd>

<p>The user you wish to connect as (this is often a user with administrator privilages). Note that while this is a required argument, it may be supplied via the configuration file to avoid lots of scripts with the user (and password) in them (less to...

</dd>
<dt id="password">password</dt>
<dd>

<p>The password to the user you wish to connect as. This may come from the configuration file if set.</p>

</dd>
</dl>

<p>There are a number of optional arguments, they are:</p>

<dl>

<dt id="max_returns">max_returns</dt>
<dd>

<p>Set a limit on how many items may be returned from certain calls. Setting this value to 0 sets unlimited returns. This parameter can also be set on individual calls. <b>Note:</b> This is a system wide configuration change and requires administrato...

<p><b>Note: You should not use a value less than the default system value for this field or you may impact normal operation of your system</b></p>

<p>Example usage:</p>

<pre><code> reset_limit =&gt; 0, # unlimited returns</code></pre>

</dd>
<dt id="reset_limit">reset_limit</dt>
<dd>

html/Simple.html  view on Meta::CPAN

</code></pre>

<h2 id="get_list">get_list</h2>

<p>Method to return an array reference of Entry-Id values for a form. Arguments are passed as an hash reference, with two required parameters, eg:</p>

<pre><code> <span class="comment"># Get theEntry-Id's for all records in the 'User' form.</span>
 <span class="keyword">my</span> <span class="variable">$eids</span> <span class="operator">=</span> <span class="variable">$ars</span><span class="operator">-&gt;</span><span class="variable">get_list</span><span class="operator">(</span><span class...
</code></pre>

<p>The query parameter can be the same format as you would use in the &#39;User Tool&#39; to query a form, however we recommend the use of field ID&#39;s (FID) rather than the default field name as they may change. I prefer to define a hash of the fo...

<pre><code> <span class="keyword">my</span> <span class="variable">%user</span> <span class="operator">=</span> <span class="operator">(</span> <span class="string">UserID</span> <span class="operator">=&gt;</span> <span class="number">101</span><spa...
</code></pre>

<p>the a query could be something like</p>

<pre><code> <span class="keyword">my</span> <span class="variable">$query</span> <span class="operator">=</span> <span class="string">qq{ '</span><span class="variable">$user</span><span class="string">{UserID}' LIKE "g%" }</span><span class="operato...
 <span class="keyword">my</span> <span class="variable">$eids</span> <span class="operator">=</span> <span class="variable">$ars</span><span class="operator">-&gt;</span><span class="variable">get_list</span><span class="operator">(</span><span class...
</code></pre>

html/Simple.html  view on Meta::CPAN

<p>The lfid array used by the get_data_by_label() method required that a hash is defined which describes the field lables (names) you want to use mapped to the field ID (FID). The encluded script will construct such a hash for all relavent fields. Yo...

<p>There is a win32 version of this which copies the data to your clipboard, to make your life easier.</p>

<h1 id="AUTHOR">AUTHOR</h1>

<p>Greg George, <code>&lt;gng at cpan.org&gt;</code></p>

<h1 id="BUGS">BUGS</h1>

<p>Please report any bugs or feature requests to <code>bug-ars-simple at rt.cpan.org</code>, or through the web interface at <a href="http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ARS-Simple">http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ARS-Simple...

<h1 id="SUPPORT">SUPPORT</h1>

<p>You can find documentation for this module with the perldoc command.</p>

<pre><code>    perldoc ARS::Simple</code></pre>

<p>You can also look for information at:</p>

<ul>

lib/ARS/Simple.pm  view on Meta::CPAN

 #    'FullName' => 'Greg George',
 #    'LicenseType' => 2,
 #    'LoginName' => 'gregg'
 #  },
 #  '000000000024470' => {
 #    'FullName' => 'Gabrielle Gustoff',
 #    'LicenseType' => 0,
 #    'LoginName' => 'ggustoff'
 #  },

 # Update a record, change the Login Name to 'greg'
 my %lvp = ( LoginName => 'greg' );
 $ar->update_record({
     eid  => '000000000014469',
     form => 'User',
     lvp  => \%lvp,
     lfid => { 'LoginName', 101, 'FullName', 8, 'LicenseType', 109, },
     });

=head1 VERSION

lib/ARS/Simple.pm  view on Meta::CPAN

=item server

The name (or possibly IP Address) of the Remedy ARSystem server you
wish to connect to.

=item user

The user you wish to connect as (this is often a user with administrator
privilages).  Note that while this is a required argument, it may be supplied
via the configuration file to avoid lots of scripts with the user (and password)
in them (less to change, not on display so safer).

=item password

The password to the user you wish to connect as.  This may come from the configuration
file if set.

=back

There are a number of optional arguments, they are:

=over 4

=item max_returns

Set a limit on how many items may be returned from certain calls.
Setting this value to 0 sets unlimited returns.  This parameter
can also be set on individual calls. B<Note:> This is a system wide
configuration change and requires administrator privilages on user.

B<Note: You should not use a value less than the default system value
for this field or you may impact normal operation of your system>

Example usage:

 reset_limit => 0, # unlimited returns

=item reset_limit

lib/ARS/Simple.pm  view on Meta::CPAN

=head2 get_list

Method to return an array reference of Entry-Id values for a form.
Arguments are passed as an hash reference, with two required parameters, eg:

 # Get theEntry-Id's for all records in the 'User' form.
 my $eids = $ars->get_list({ form => 'User', query => '1 = 1' });

The query parameter can be the same format as you would use in the 'User Tool'
to query a form, however we recommend the use of field ID's (FID) rather than the
default field name as they may change.  I prefer to define a hash of the
forms lables and FID's so that can be used to better document your code, eg

 my %user = ( UserID => 101, UserName => 102 );

the a query could be something like

 my $query = qq{ '$user{UserID}' LIKE "g%" };
 my $eids = $ars->get_list({ form => 'User', query => $query });

=head2 get_data_by_label

lib/ARS/Simple.pm  view on Meta::CPAN

=head1 ARSperl Programer's Manual

see http://arsperl.sourceforge.net/manual/toc.html

=head1 Default User/Password

The default user and password to use can be configured during install
by the Config.PL script.  This creates a configuration file Simple.cfg
which is stored with Simple.pm.  Unless specified in the call to the
new method, the use and password from Simple.cfg will be used.  This
has the advantage of a single place of change and removes the user and
password from scripts.

Note that the use and password are obfuscated and B<not> encrypted in
the Simple.cfg file.

=head1 TODO

Add in the tools below.

Add in further methods to make life easier and your code more readable

lib/ARS/Simple.pm  view on Meta::CPAN

to your clipboard, to make your life easier.

=head1 AUTHOR

Greg George, C<< <gng at cpan.org> >>

=head1 BUGS

Please report any bugs or feature requests to C<bug-ars-simple at rt.cpan.org>, or through
the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=ARS-Simple>.  I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc ARS::Simple

You can also look for information at:

=over 4



( run in 0.290 second using v1.01-cache-2.11-cpan-c333fce770f )