<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dataflex.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Garretmott</id>
	<title>DataFlex Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://dataflex.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Garretmott"/>
	<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Special:Contributions/Garretmott"/>
	<updated>2026-04-30T15:14:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://dataflex.wiki/index.php?title=Talk:Portal:Data_Connectivity&amp;diff=1897</id>
		<title>Talk:Portal:Data Connectivity</title>
		<link rel="alternate" type="text/html" href="https://dataflex.wiki/index.php?title=Talk:Portal:Data_Connectivity&amp;diff=1897"/>
		<updated>2008-04-30T03:27:17Z</updated>

		<summary type="html">&lt;p&gt;Garretmott: Run a procedure after a record is found &amp;amp; all relates, constraints, etc. are done&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One thing VDF is missing is an event that fires after a record is found &amp;amp; all relates, constrains, etc. are done.&lt;br /&gt;
&lt;br /&gt;
Matthew Davidian responded to a post of mine in the VDF newsgroup with a great solution.  I&#039;ve expanded it to cover VDF 11.1 &amp;amp; later - which use FindByRowID instead of Find_By_Recnum.&lt;br /&gt;
&lt;br /&gt;
After putting the code below in your DataDictionary subclass, put the following in a local DataDictionary (one in a view, dialog, etc.):&lt;br /&gt;
&lt;br /&gt;
 Object oTable_DD is a Table_DataDictionary&lt;br /&gt;
   Set DDO_Server to oParent_DD&lt;br /&gt;
        &lt;br /&gt;
   Set AfterRecordFound_msg to ProcName&lt;br /&gt;
 &lt;br /&gt;
   Procedure ProcName&lt;br /&gt;
       Do something&lt;br /&gt;
       Do something else&lt;br /&gt;
   End_Procedure&lt;br /&gt;
&lt;br /&gt;
The code for your DataDictionary class:&lt;br /&gt;
&lt;br /&gt;
 Class MyDataDictionary is a DataDictionary&lt;br /&gt;
&lt;br /&gt;
    // Construct_Object: Object constructor.&lt;br /&gt;
    Procedure Construct_object&lt;br /&gt;
        Forward Send Construct_Object&lt;br /&gt;
&lt;br /&gt;
        // Define new Properties: Property {Type} {pxName} {initial_value}&lt;br /&gt;
&lt;br /&gt;
        // Set this property in Local DD to a local proc&lt;br /&gt;
        // that will get called after records are found&lt;br /&gt;
        Property String AfterRecordFound_msg &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        // Create child objects&lt;br /&gt;
&lt;br /&gt;
        // Set property values:&lt;br /&gt;
    End_Procedure&lt;br /&gt;
&lt;br /&gt;
    // Below three procs from Matthew Davidian to create a proc&lt;br /&gt;
    // that runs after Finds/constraints, etc. are done&lt;br /&gt;
    // GM Added Procedure FindByRowID&lt;br /&gt;
&lt;br /&gt;
    Procedure Request_Find Integer iFind_Mode# Integer iFile# Integer iIndex#&lt;br /&gt;
        Integer iAfterRecordFound&lt;br /&gt;
&lt;br /&gt;
        Forward Send Request_Find iFind_Mode# iFile# iIndex#&lt;br /&gt;
&lt;br /&gt;
        [Found] If (AfterRecordFound_msg(Self)) Begin&lt;br /&gt;
            Get AfterRecordFound_msg to iAfterRecordFound&lt;br /&gt;
            Send iAfterRecordFound iFile#&lt;br /&gt;
            Indicate Found True&lt;br /&gt;
        End&lt;br /&gt;
    End_Procedure&lt;br /&gt;
&lt;br /&gt;
    Procedure Find_By_Recnum Integer iFile# Integer iRec#&lt;br /&gt;
        Integer iAfterRecordFound&lt;br /&gt;
&lt;br /&gt;
        Forward Send Find_By_Recnum iFile# iRec#&lt;br /&gt;
&lt;br /&gt;
        [Found] If (AfterRecordFound_msg(Self)) Begin&lt;br /&gt;
            Get AfterRecordFound_msg to iAfterRecordFound&lt;br /&gt;
            Send iAfterRecordFound iFile#&lt;br /&gt;
            Indicate Found True&lt;br /&gt;
        End&lt;br /&gt;
    End_Procedure&lt;br /&gt;
&lt;br /&gt;
    Procedure Request_Assign Integer iFile#&lt;br /&gt;
        Integer iAfterRecordFound&lt;br /&gt;
&lt;br /&gt;
        Forward Send Request_Assign iFile#&lt;br /&gt;
&lt;br /&gt;
        [Found] If (AfterRecordFound_msg(Self)) Begin&lt;br /&gt;
            Get AfterRecordFound_msg to iAfterRecordFound&lt;br /&gt;
            Send iAfterRecordFound iFile#&lt;br /&gt;
            Indicate Found True&lt;br /&gt;
        End&lt;br /&gt;
    End_Procedure&lt;br /&gt;
&lt;br /&gt;
    Procedure FindByRowID Integer iFile# RowID riRowId&lt;br /&gt;
        Integer iAfterRecordFound&lt;br /&gt;
&lt;br /&gt;
        Forward Send FindByRowId iFile# riRowId&lt;br /&gt;
&lt;br /&gt;
        [Found] If (AfterRecordFound_msg(Self)) Begin&lt;br /&gt;
            Get AfterRecordFound_msg to iAfterRecordFound&lt;br /&gt;
            Send iAfterRecordFound iFile#&lt;br /&gt;
            Indicate Found True&lt;br /&gt;
        End&lt;br /&gt;
    End_Procedure&lt;/div&gt;</summary>
		<author><name>Garretmott</name></author>
	</entry>
</feed>