How to limit browse dialog on child dialog form


Author
Message
Larry Tucker
Larry Tucker
StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)
Group: StrataFrame Users
Posts: 69, Visits: 308
Hi,

I've got a child dialog form (built from SF Maintenance class) working well except for its browse dialog, which is not limiting the offered records to those associated with the current parent record.  When it is searched, it offers all possible child records. 

The BO relationship is correctly setup, because adding a MyChildBO1 record correctly fills its FK_Parent foreign key field.  And when I navigate through the child records, only those for a given FK_Parent are shown.   What I would like is for only those records to be offered on the child form's browse dialog.

To help inform the browse dialog, I added a copy of the MyParentBO1 to the child form and have the parent form CFD fill both the MyChildBO1 and MyParentBO1.   I've checked that on the child form, MyParentBO1 is sitting there on the correct record after it is loaded, so that its PK does match the FK on the child records.

I've tried fiddling with the various settings within the ChildForm.BrowseDialog1.BusinessObjectToPopulate properties.  In there, the ParentBusinessObject is correctly set to MyParentBO1.  "ChildAutoFilterOption" looked promising but doesn't seem to help.

Any suggestions would be appreciated. 

TIA,

Larry

Replies
Larry Tucker
Larry Tucker
StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)
Group: StrataFrame Users
Posts: 69, Visits: 308
Trent L. Taylor (03/07/2008)
I am not sure exacatly what you are doing, but the BrowseDialog will update the BO that is set in the BusinessObjectToPopulate property of the BrowseDialog, as well as set the current index to the selected record in the results.  So be sure to check that you have the correct instance of the BO being updated...otherwise, nothing will happen Smile

Trent, not sure if you were really asking for "exactly what I'm doing", but here are some attached screen shots <s>.  As you can see, the BusinessObjectToPopulate property is correctly set.

I deleted the child form completely and started from scratch with an absolute minimum configuration and am getting the same results.  The browse dialog does work when I call the child form directly (and fill it using a FillAll() button).  It does not work when I call the child form from the parent form.  This suggests that the browse settings are correct and that it the problem has something to do with the way the child form is being called (direct or as a CFD).

In a way, it makes sense to me that the browse should have trouble when the form is called as a child form.  Let's say the child form loads with 10 records associated with the parent record on the parent form.  Then you hit the browse button with no special conditions and it offers all 50 records in the child table (unfiltered).  And you pick one that is not even in the current 10 in the child form BO.  Where is the record pointer supposed to go when you close the browse?  Obviously, I don't yet know s#it from shinola about what is actually going on under Strataframe's hood but it seems logical that either the browse dialog is already tuned into the filter assumed by the child form... or its not.  And if its not, then I don't see how it could reliably work.  BTW, I tried setting the FK_TemHead filter in the browse window, which correctly limited the displayed records to the same ones in the child form... and the positioning still doesnt work.

Enough speculating... If you could take a look at the attachment, I'd appreciate it.  I fully expect that it will take you 2 seconds to find a setting I have missed.Unsure

Larry

Attachments
ChildDialogBrowse.doc (147 views, 317.00 KB)
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Larry,

I am confuse here, why would you need (or want) a Browser Dialog in a child form which I believe will only display filtered records by its parent?

Edhy Rijo

Larry Tucker
Larry Tucker
StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)
Group: StrataFrame Users
Posts: 69, Visits: 308
Hi Edhy,

Good to hear from you. 

Edhy Rijo (03/07/2008)
confused here, why would you need (or want) a Browser Dialog in a child form which I believe will only display filtered records by its parent?

It's like the "related forms" we've been using in VPM (Visual ProMatrix for Foxpro):  when you open a child form you have both toolbar arrow and list button navigation options which are synchronized and limited to the value on the parent table.  In Strataframe, I'm testing using a "SF Maintenance Form" class for both the parent and related child maintenance.  I just want the UI to be consistent so that if I offer a browse dialog on the parent form, then I'd like it offered on the child form too. 

The child form's browse dialog would be more for navigation than subsetting and would simply produce a list of available child records with incremental search in the list but no search fields per se.   (The Advance Browse sample shows something like this where all "Smith" records are presented immediately when you hit the browse button with no search fields or query).

I think your question concerns the subsetting / query function of the browse dialog and you're right, most child tables will have few enough related items that further subsetting would not be necessary.  So I'm just thinking of it as a quick navigation option through say 30 or so child records. 

Again, I was starting with the idea of using an SF Maintenance form for the child table with only one record showing at a time.  In contrast, the sample ChildDialog puts the navigation list right on the child form (CustomerNotes) and requires a third edit form to do the editing of a child item (CustomerNoteEditor).  I was thinking of having the child form itself be the edit form (SF Maintenance) with the same toolbar and browse options as the parent form.   If there are only a few child records, then the toolbar nav buttons will suffice; if there are 20 or 30 child records, then a quick browse button would be nice.  Not a big deal really.  I just thought the user would find it more familiar if the parent, child and possible grandchild forms all had the same presentation (SF Maintenance) and didn't require additional "edit forms" to get anything done. 

Larry

Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Larry,

Good to hear from you too!

I think I now understand what you want to do, but keep in mind that the key to success with any framework with to work with it not against it Smile

I still need to learn a lot about SF but I believe that if all you need is to provide end user with an easy way to locate a child record, you can simply add a grid or list where then can just scroll to the record faster and edit the current selected one.

I am working on a simple project and been playing with relations and came up with something like in the iamge attached, where you have the following:

  • Parent record on top
  • Multiple Children at the bottom
  • Edit of child record data in the same page of the child listing.

Again, this is just a sample view, but I sure it can be done in many ways, specially in SF where is easier to handle related records than in VPM (VFP).

Edhy Rijo

Larry Tucker
Larry Tucker
StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)StrataFrame User (173 reputation)
Group: StrataFrame Users
Posts: 69, Visits: 308
Hi Edhy,

Actually, I thought using a built-in browse dialog was working with the framework <s>... but maybe not. 

Thanks for the suggestion and screen shot.  I agree it is easier to work with a child BO on the same parent form because of SF's automatic synchronization (both when you navigate the parent and when you add a child).  SF does a nice job of managing a lot for you.  And your example avoids the separate browse and edit windows.

Keeping the children on the same page may also better communicate to the user that they really are connected to the current parent; a separate child form floating on its own makes this connection less concrete. 

(In VPM, I actually used related pages a lot more than related forms for this reason... clicking on a child tab made more sense to my users than poping up a new window.  The less sophisticated the user, the more they seemed put off by multiple windows.  I've had some good luck building related pages forms in SF too. Wink

Overall I'm liking this framework a lot.

Larry 

Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Larry Tucker (03/08/2008)

(In VPM, I actually used related pages a lot more than related forms for this reason... clicking on a child tab made more sense to my users than poping up a new window.  The less sophisticated the user, the more they seemed put off by multiple windows.  I've had some good luck building related pages forms in SF too. Wink

Hi Larry,

Honestly I never used the Related Form functionality in VPM, I am sure some developers may find it very useful, but in my case, I try to keep it simple whenever I can.  Also I am always looking at other commercial applications look and I have never seen the Related Form approach which lead me to just keep it in the bag in case I may ever use it, but after 10+ years working with VPM (Visual ProMatrix) I never actually use it and disable it at the base class.

I am glad to be of some help.  Please show us your final form when complete.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Larry Tucker - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Larry Tucker - 17 Years Ago
Larry Tucker - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Larry Tucker - 17 Years Ago
Edhy Rijo - 17 Years Ago
                         Hi Edhy, Good to hear from you. [quote][b]Edhy Rijo...
Larry Tucker - 17 Years Ago
                             Hi Larry, Good to hear from you too! I think I now understand what...
Edhy Rijo - 17 Years Ago
                                 Hi Edhy, Actually, I thought using a built-in browse dialog was...
Larry Tucker - 17 Years Ago
                                     [quote][b]Larry Tucker (03/08/2008)[/b][hr] (In VPM, I actually used...
Edhy Rijo - 17 Years Ago
Richard Keller - 17 Years Ago
Edhy Rijo - 17 Years Ago
Trent L. Taylor - 17 Years Ago
                     Everyone, Yes, this is very helpful and all the input is...
Larry Tucker - 17 Years Ago
                         [quote] what is the easiest UI for the user;[/quote] This in itself...
Trent L. Taylor - 17 Years Ago
Larry Tucker - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search