CurrentRecordIsUpdated (System function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
m (guess subtitle, syntax and footer template names, match syntax terms to template, lots of tags and edits.)
Line 1: Line 1:
<span style="font-size:120%; color:black"><b><section begin=dpl_desc/>Has record been updated?<section end=dpl_desc/></b></span>
{{Template:System:CurrentRecordIsUpdated subtitle}}
[[Category:System methods|CurrentRecordIsUpdated function]]
The <var>CurrentRecordIsUpdated</var> is shared function which returns a <var>[[Boolean]]</var> value that indicates whether the current record in the current record-oriented loop has been updated in the current transaction.
[[Category:System/Subsystem methods]]
 
<!--DPL?? Category:System methods|CurrentRecordIsUpdated function: Has record been updated?-->
==Syntax==
<p>
{{Template:System:CurrentRecordIsUpdated syntax}}
CurrentRecordIsUpdated is a member of the [[System class]].
===Syntax Terms===
</p>
<table class="syntaxTable">
<tr><th>%boolean</th><td>A <var>[[Boolean enumeration]]</var> value indicating whether the current record has been updated. For more information about these enumerations, see [["Using Boolean enumerations"]].</td></tr>
This shared function returns a Boolean value that
<tr><th>%(system)</th><td>The class name in parentheses denotes a shared method.</td></tr>
indicates whether the current record in the current
</table>
record-oriented loop has been updated in the current
 
transaction.
==Usage Notes==
The CurrentRecordIsUpdated method is available in ''Sirius Mods'' 7.7 and later.
===Syntax===
  %bool = %(system):CurrentRecordIsUpdated
====Syntax Terms====
<dl>
<dt><i><b>%bool</b></i>
<dd>The Boolean enumeration value indicating whether the current record
has been updated.
For more information about these enumerations, see [[Using Boolean enumerations]].
<dt>%(system)
<dd>The class name in parentheses denotes a shared method.
</dl>
===Usage Notes===
<ul>
<ul>
<li>[[RecordIsUpdated (System function)|RecordIsUpdated]] reports whether a record
<li><var>CurrentRecordIsUpdated</var> is available in <var class="product">[[Sirius Mods|"Sirius Mods"]]</var> Version 7.7 and later.
you identify by filename and record number
has been updated within the current transaction.
</ul>
</ul>
===Example===
 
==Example==
The following request fragment sketches a record updating loop that reports to
<ol><li>The following request fragment sketches a record updating loop that reports to the audit trail if this is an initial update for each record in the transaction:
the audit trail if this is an initial update for each record in the transaction:
<p class="code">%recs is object recordset in file myfile
<p class="code"><nowiki>%recs is object recordset in file myfile
%rec is object record in file myfile
%rec is object record in file myfile
   
   
Line 41: Line 23:
end find
end find
for each record in %recs
for each record in %recs
  %rec = CurrentRecord
  %rec = CurrentRecord
  if %(system):currentRecordIsUpdated ne true then
  if %(system):currentRecordIsUpdated ne true then
    Audit 'First update of Record num: ' %rec:RecordNumber
      audit 'First update of Record num: ' %rec:RecordNumber
  end if
  end if
  ...
  ...
end for
end for
</nowiki></p>
</p></ol>
 
==See also==
<ul>
<li><var>[[RecordIsUpdated (System function)|RecordIsUpdated]]</var> reports whether a record you identify by filename and record number has been updated within the current transaction.
</ul>
{{Template:System:CurrentRecordIsUpdated footer}}

Revision as of 10:17, 19 March 2011

Is the current record updated? (System class)

[Introduced in Sirius Mods 7.7]

The CurrentRecordIsUpdated is shared function which returns a Boolean value that indicates whether the current record in the current record-oriented loop has been updated in the current transaction.

Syntax

%boolean = %(System):CurrentRecordIsUpdated

Syntax Terms

%booleanA Boolean enumeration value indicating whether the current record has been updated. For more information about these enumerations, see "Using Boolean enumerations".
%(system)The class name in parentheses denotes a shared method.

Usage Notes

  • CurrentRecordIsUpdated is available in "Sirius Mods" Version 7.7 and later.

Example

  1. The following request fragment sketches a record updating loop that reports to the audit trail if this is an initial update for each record in the transaction:

    %recs is object recordset in file myfile %rec is object record in file myfile fd to %recs end find for each record in %recs %rec = CurrentRecord if %(system):currentRecordIsUpdated ne true then audit 'First update of Record num: ' %rec:RecordNumber end if ... end for

See also

  • RecordIsUpdated reports whether a record you identify by filename and record number has been updated within the current transaction.