Filtering Child ListView


Author
Message
Carla Bewley
Carla Bewley
StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)StrataFrame Beginner (4 reputation)
Group: Forum Members
Posts: 4, Visits: 48
I'm new to SF with a background in VFP/VFE. I'm trying to recreate a little app I recently wrote for a client as a means of evaluating/learning SF. I have a form set up for the TicketHdr table with a ListView on it for the Ticket (child) records. If I use the FillByParent(BusinessLayer) method to populate the ListView I get all of the child records instead of just the ones associated with the current TicketHdr. I've tried a variety of things and can't seem to come up with the right combination to properly display the child records. TIA
Replies
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
Well, how do you have a Parent/Child table without a primary key field?



The BO has a Filter property which accepts a "Where" condition, but that is not optimal in your case, also you can create your own FillBy... method in the BO using your own SQL statement to grab the data and use that method to populate the childview, but you must have a FK field to filter the child table.



About using VFP tables, that is something I have not done yet, but I know others do including the SF Team, so look in the forum if you need help on how to setup the VFP connection.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
A couple of things.  FIrst of all, you will need to have a PK in order to setup any type of parent/child relationship in order for their to be a foreign key constraint.  Otherwise, you will have to create your own Fill method to populate.  Secondly, if you have a filter applied and BO already populated with data, then you will want to use the CopyDataFrom method on the BO rather than requerying the database.  If you already have the records loaded in another BO and want to populate a combo or other SF list, then you will want to setup the list to call the CopyDataFrom method and then pass over the already filtered/populated BO.  There are a lot of samples of this, but you can look at the StrataFlix sample and anywhere you see a child listview it will be populating like this.  If this doesnt' get you going then let us know and we will try and give more details and steer you in the right direction.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Carla Bewley - 16 Years Ago
Edhy Rijo - 16 Years Ago
Carla Bewley - 16 Years Ago
Edhy Rijo - 16 Years Ago
Carla Bewley - 16 Years Ago
Carla Bewley - 16 Years Ago
                         Well, how do you have a Parent/Child table without a primary key...
Edhy Rijo - 16 Years Ago
                             A couple of things. FIrst of all, you will need to have a PK in order...
Trent L. Taylor - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search