Hi
I have been struggling with dojoin in ND 4.x
I want to use it on a master/detail page
My master page uses a repeated group so does my detail page
When I use in OnbeforeDisplayEvent at the master page level
Code is
return (doJoin (event.getRowIndex()));

The join is not working to my detail

I have the joindatafield set up from master to detail
and the datafield is a unique key.

My master dataobject displays many records but I am just showing 1 record in my 
repeated group.


The above code works if the master page doesn't have a repeated.

I am confused.  What am I doing wrong??



Curt Springer <[EMAIL PROTECTED]> wrote:
>'doJoin' does not actually join data objects.  It is used in master -
>detail relationships.  As you observed, it implies sequential execution of
>logically-related data objects.  Often this is in two web events, so that
>the user can view the results of execution on the master, choose one row,
>and then view the associated detail rows.  The primary purpose of doJoin is
>to set foreign key criteria in the detail data object based on the primary
>key values of a chosen row in the (latest) results set of the master data
>object (which means, of course, that the master data object has to be
>executed before 'doJoin' is called.  'doJoin' does not cause the detail
>data object to be executed.  In the case of a bound data object, that might
>happen automatically in the course of a page's 'display' processing.  If
>the data object is not bound to a page, you will have to write code to
>execute it after your 'doJoin' is executed.
>
>doJoin can be called at any of 3 levels, but the only real action takes
>place at the lowest level.
>
>1.  CSpDataDrivenVisual (page or repeated) doJoin(int rowindex)
>Simply passed down to all data objects bound to the page or repeated.
>
>2.  CSpCriteriaSQLObject (including all garden-variety data objects) 
>doJoin(int rowindex)
>(assuming that a row exists corresponding to rowindex in the data objects
>results set (from its last execution))
>
>Cycle through the CSpDataFields (columns) in the data object.  For each one
>with a non-empty 'JoinDataFields' property (set in the studio), call
>doJoin(CSpValue value) on the CSpDataField, where 'value' is the value of
>the column in the results set row indicated by rowindex.
>
>(actually, it more likely calls doJoin on all columns, and the ones with
>empty JoinDataFields just don't do anything.  I always think of it
>operating as described above, calling the columns selectively.)
>
>3.  CSpDataField -- doJoin(CSpValue value)
>The 'JoinDataFields' property of a data object column is a list of strings
>of the form 'join_dataobject_name.join_column_name'.
>
>2 things happen:
>1.  Once for each join dataobject in the list, 'join' dynamic criteria are
>cleared.
>2.  For each entry in the list, 'addDynamicCriterion' is called on the
>specified join dataobject, specifying the name of the join data column,
>some form of 'equals' criterion, the supplied CSpValue argument, and the
>specification that this is a criterion of type 'join'.
>
>Well, that's pretty much all there is to it.
>
>-- Curt Springer, Team NetDynamics
>
>
>
>
>
>At 08:33 AM 3/5/99 -0800, [EMAIL PROTECTED] wrote:
>>I'm having a problem joining two data objects that contain DB2 table
>views.  I have set the "JoinDataFields" property in the
>>inspector and have issued the doJoin() command.  The results returned on
>the target page includes data from both data
>>objects,  but it is not the correct data.  The data field is not being
>used to join the data objects and display the results. 
>>It appears to be executing each data object separately.  I've searched the
>Forums and the Tech Notes and have tried
>>several different things.  
>>
>>This is one example of what I have tried:
>>
>>      //[[SPIDER_EVENT<this_onBeforeRowDisplayEvent>
>>      public int this_onBeforeRowDisplayEvent(CSpDataDrivenVisualEvent event)
>>      {
>>              doJoin(event.getRowIndex());    
>>              return (PROCEED);
>>      }
>>      //]]SPIDER_EVENT<this_onBeforeRowDisplayEvent> 
>>        
>>_________________________________________________________________________
>>
>>For help in using, subscribing, and unsubscribing to the discussion
>>forums, please go to: http://www.netdynamics.com/support/#forums
>>
>>For dire need help, email: [EMAIL PROTECTED]
>>
>

_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to