﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Multiple Child BO Relationships</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 01:39:43 GMT</lastBuildDate><ttl>20</ttl><item><title>Multiple Child BO Relationships</title><link>http://forum.strataframe.net/FindPost16681.aspx</link><description>I am having some difficulty establishing a relationship from a parent business object to two child BO's on the same form.&amp;nbsp; I have a customer (parent) business object linking to&amp;nbsp;customer type and customer address business objects (children).&amp;nbsp; The child information is to be displayed in listviews for each one on a tabbed form.&amp;nbsp; I have gone through the steps of setting the ParentRelationship property on each child BO to point to the Customer BO.&amp;nbsp; I have also set the ParentBusinessObject property for each child BO instance on the form.&amp;nbsp; The ChildAutoFilterOption property of the Customer BO is set to "MatchCurrentRow."&amp;nbsp; The customer type BO populates its listview and I can cursor through the records and see the proper data.&amp;nbsp; The customer address listview does not populate.&amp;nbsp; Can a parent BO have two child BO's on the same form and be populated using the functions of Strataframe?&amp;nbsp; Any help would be appreciated!&amp;nbsp; :crazy: Thanks!&lt;/P&gt;&lt;P&gt;Doug</description><pubDate>Thu, 29 May 2008 16:57:10 GMT</pubDate><dc:creator>Douglas Riley</dc:creator></item><item><title>RE: Multiple Child BO Relationships</title><link>http://forum.strataframe.net/FindPost16702.aspx</link><description>[quote][b]Trent L. Taylor (05/29/2008)[/b][hr]I'll elaborate more on this in class and show what happens when you leave filters on.&amp;nbsp; Bottom line, if it is working for you, just leave it alone.[/quote]&lt;/P&gt;&lt;P&gt;Thanks Trent,&lt;/P&gt;&lt;P&gt;I have a couple of questions for the class already and includes the sorting chapter. :P</description><pubDate>Thu, 29 May 2008 16:57:10 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Multiple Child BO Relationships</title><link>http://forum.strataframe.net/FindPost16699.aspx</link><description>Sure :)</description><pubDate>Thu, 29 May 2008 15:49:04 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Multiple Child BO Relationships</title><link>http://forum.strataframe.net/FindPost16696.aspx</link><description>Thanks again Trent!</description><pubDate>Thu, 29 May 2008 15:23:15 GMT</pubDate><dc:creator>Douglas Riley</dc:creator></item><item><title>RE: Multiple Child BO Relationships</title><link>http://forum.strataframe.net/FindPost16694.aspx</link><description>[quote]Since I am using a maintenance form, does my parent business object have to have the IncludeInFormNavigate property set to true in order to coordinate movement?[/quote]&lt;/P&gt;&lt;P&gt;If you are using a ListVIew (StrataFrame ListView), then you can just set the AutoNavigateToSelectedRecord property to True and set the BusinessObject property to the child BO...then you don't have to worry about the IncludeInForm navigate stuff at all....it is&amp;nbsp;much easier this way.&lt;/P&gt;&lt;P&gt;You will have to be using the 1.6.6 beta to have this new feature.&amp;nbsp; You can get it here: &lt;A href="http://forum.strataframe.net/FindPost16061.aspx"&gt;http://forum.strataframe.net/FindPost16061.aspx&lt;/A&gt;</description><pubDate>Thu, 29 May 2008 14:09:54 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Multiple Child BO Relationships</title><link>http://forum.strataframe.net/FindPost16693.aspx</link><description>[quote]but with your suggestion I understand that this property should not be used? or there are specific cases for not using it?[/quote]&lt;/P&gt;&lt;P&gt;I'll elaborate more on this in class and show what happens when you leave filters on.&amp;nbsp; Bottom line, if it is working for you, just leave it alone.&lt;/P&gt;&lt;P&gt;The problem comes when you add new records or change a field that is part of the filter...then you will start having strange behavior.&amp;nbsp; That was my point...secondly, you are going to have more control when you use the above technique over the auto-filter.&amp;nbsp; The whole point really has nothing to do with the auto-fitler as much as leaving fitlers on.</description><pubDate>Thu, 29 May 2008 14:07:17 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Multiple Child BO Relationships</title><link>http://forum.strataframe.net/FindPost16687.aspx</link><description>[quote][b]Trent L. Taylor (05/29/2008)[/b][hr][quote]&lt;P&gt;[quote]The ChildAutoFilterOption property of the Customer BO is set to "MatchCurrentRow."&amp;nbsp;[/quote]&lt;/P&gt;&lt;P&gt;This could be your problem...using this in this scenario could come back and bite you.&amp;nbsp; Turn this off, ...[/quote]&lt;/P&gt;&lt;P&gt;Hi Trent,&lt;/P&gt;&lt;P&gt;This is a bit confusing, I have a couple of forms which shows a Parent-Child relation using the ChildAutoFilterOption property, so far, it works fine, I have not noticed any problem yet, but with your suggestion I understand that this property should not be used? or there are specific cases for not using it?&lt;/P&gt;&lt;P&gt;Can you please elaborate on this, to clarify the use of this property.&amp;nbsp; I may have to go back and&amp;nbsp;change some forms now :D</description><pubDate>Thu, 29 May 2008 11:59:25 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: Multiple Child BO Relationships</title><link>http://forum.strataframe.net/FindPost16686.aspx</link><description>Trent,&lt;/P&gt;&lt;P&gt;Thank you so much! That worked out fine!&amp;nbsp; Since I am using a maintenance form, does my parent business object have to have the IncludeInFormNavigate property set to true in order to coordinate movement?&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;Doug</description><pubDate>Thu, 29 May 2008 11:37:21 GMT</pubDate><dc:creator>Douglas Riley</dc:creator></item><item><title>RE: Multiple Child BO Relationships</title><link>http://forum.strataframe.net/FindPost16683.aspx</link><description>[quote]Can a parent BO have two child BO's on the same form and be populated using the functions of Strataframe?&amp;nbsp;[/quote]&lt;/P&gt;&lt;P&gt;Sure, I setup one up the other day that had 8-10...with a lot of other foreign keys as well...so this is totally doable.&lt;/P&gt;&lt;P&gt;[quote]The ChildAutoFilterOption property of the Customer BO is set to "MatchCurrentRow."&amp;nbsp;[/quote]&lt;/P&gt;&lt;P&gt;This could be your problem...using this in this scenario could come back and bite you.&amp;nbsp; Turn this off, then on the ListView, I assume you are using the CopyDataFrom method and then providing the BO and clone type on the ListPopulating event.&amp;nbsp; Before you set the e.Parameters(), set the filter:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ListPopulating Event&lt;/STRONG&gt;&lt;BR&gt;[codesnippet]MyChildBO.Filter = "ForeignKey = " &amp;amp; ParentBO.PrimaryKey.ToString()&lt;/P&gt;&lt;P&gt;e.Parameters(0).Value = MyChildBO&lt;BR&gt;e.Parameters(1).Value = MicroFOur.StrataFrame.Business.BusinessCloneType.ClearAndFillFromDefaultView[/codesnippet]&lt;/P&gt;&lt;P&gt;Then &lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;BE SURE TO CLEAR THE FILTER&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; in the AfterRequery event:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AfterRequery Event&lt;/STRONG&gt;&lt;BR&gt;[codesnippet]MyChildBO.Filter = ""[/codesnippet]&lt;/P&gt;&lt;P&gt;Doing this is far safer than leaving a filter on all of the time which can produce a lot of other side-effects (i.e. add a new record and rows change, etc).&amp;nbsp; Above would be the recommended way to setup this type of environment.</description><pubDate>Thu, 29 May 2008 10:51:53 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>