RecordIsUpdated (System function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (fix "using boolean enumerations" link)
(Automatically generated page update)
 
(11 intermediate revisions by 3 users not shown)
Line 4: Line 4:
==Syntax==
==Syntax==
{{Template:System:RecordIsUpdated syntax}}
{{Template:System:RecordIsUpdated syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%boolean</th><td>The Boolean enumeration value indicating whether the record has been updated.  For more information about these enumerations, see [[Enumerations#Using_Boolean_enumerations|"Using Boolean Enumerations"]]. </td></tr>
<tr><th>%boolean</th>
<tr><th><var>%(System)</var></th><td>The class name in parentheses denotes a ÝÝNotation conventions for methods#Shared methods|shared¨¨ method.</td></tr>
<td>The <var>[[Boolean enumeration]]</var> value indicating whether the record has been updated. </td></tr>
<tr><th>string</th><td>A string that is the name of the file that contains the record whose update status you are querying.</td></tr>
 
<tr><th>number</th><td>The number of the record whose update status you are querying.</td></tr>
<tr><th><var class="nobr">%(System)</var></th>
<td>The class name in parentheses denotes a [[Notation conventions for methods#Shared methods|shared]] method.</td></tr>
 
<tr><th>string</th>
<td>A string that is the name of the file that contains the record whose update status you are querying.</td></tr>
 
<tr><th>number</th>
<td>The number of the record whose update status you are querying.</td></tr>
</table>
</table>


Line 26: Line 34:
   ...
   ...
* if some condition is satisfied
* if some condition is satisfied
  %rec = CurrentRecord
    %rec = CurrentRecord
     if %(system):RecordIsUpdated($curfile, $currec) ne true then
     if %(system):RecordIsUpdated($curfile, $currec) ne true then
       Audit 'First update of Record num: ' %rec:RecordNumber
       Audit 'First update of Record num: ' %rec:RecordNumber
     end if
     end if
   ...
   ...
  * perform record update
* perform record update
   end if
   end if
end for
end for
Line 38: Line 46:
==See also==
==See also==
<ul>
<ul>
<li>[[CurrentRecordIsUpdated (System function)|CurrentRecordIsUpdated]] reports whether the currently selected record has been updated within the current transaction.
<li><var>[[CurrentRecordIsUpdated (System function)|CurrentRecordIsUpdated]]</var> reports whether the currently selected record has been updated within the current transaction.
 
<li><var>[[IsUpdated (Record function)|IsUpdated]]</var> reports whether a record referenced by a <var>[[Record class|Record]]</var> object has been updated within the current transaction.
</ul>
</ul>
{{Template:System:RecordIsUpdated footer}}
{{Template:System:RecordIsUpdated footer}}

Latest revision as of 00:26, 16 February 2014

Is the indicated record updated? (System class)

[Introduced in Sirius Mods 7.7]

The RecordIsUpdated shared function returns a Boolean value that indicates whether a record you specify (by file name and record number) has been updated in the current transaction.

Syntax

%boolean = %(System):RecordIsUpdated( string, number)

Syntax terms

%boolean The Boolean enumeration value indicating whether the record has been updated.
%(System) The class name in parentheses denotes a shared method.
string A string that is the name of the file that contains the record whose update status you are querying.
number The number of the record whose update status you are querying.

Usage Notes

  • RecordIsUpdated is available in Sirius Mods Version 7.7 and later.

Examples

The following request fragment sketches a record loop that reports to the audit trail if this will be the initial update in the transaction for the records that satisfy a particular condition:

%recs is object recordset in file myfile %rec is object record in file myfile fd to %recs end find for each record in %recs ... * if some condition is satisfied %rec = CurrentRecord if %(system):RecordIsUpdated($curfile, $currec) ne true then Audit 'First update of Record num: ' %rec:RecordNumber end if ... * perform record update end if end for

See also

  • CurrentRecordIsUpdated reports whether the currently selected record has been updated within the current transaction.
  • IsUpdated reports whether a record referenced by a Record object has been updated within the current transaction.