For the sub-reps I would assume they have a field that identifies what rep they are under. You should be able to set up the second portal on a relationship to that field. You could put a couple of date fields on the layout for start and end dates and use those to filter the portal to only show records between those two dates.
This structure seems a bit rigid. Couldn't a rep have more than two sub reps immediately under him?
I'd be inclined to try setting this up with a single data source table of reps and sub-reps with a self join linking the sub-reps their rep.
thank you for your replies.
Mark you are correct on that note and i figured out something based on what you said.
Phil, i have one data source of reps/subreps already. each rep can have up to 14 sub reps in the binary from in the photo attached. where im having challenges is when you search for a rep (say Gabe) id like to see a portal that contains all of his sub reps orders from the previous month along with pertinent info like date, qty ordered and which tier in the binary graph that rep is located like the photo.
i feel like this should be an easy fix but my brain is farting so bad it smells.
also im a little confused by what you mean by "self join linking the sub-reps their rep"
im a little confused by what you mean by "self join linking the sub-reps their rep"
You can create a second Tutorial: What are Table Occurrences? of a given table and then link the two in a relationship:
Reps::__pkPersonID = Sub_Reps::_fkRepID
where, if you hover the mouse over the upper left corner of these two table occurrence "boxes" in Manage | Database | relationships, you see the same data source table name pop up in a "tool tip" type display.
each rep can have up to 14 sub reps in the binary from in the photo attached.
But that does not show the relationships you have currently in place in the database nor does is explain why this is a binary tree set up. Why is is this tree limited to only two "branches" at each level"? why not link multiple sub_reps to a given rep with all at the same level?
The binary tree is confusing when you say a rep can have 14 sub reps. Are Lisa and Michael Adriana's sub-reps or are they Gabe's or both?
thanks for your reply once again.
the use of a binary tree is a strategy to increase sales and motivate reps to get motivated sub reps to push sales for them. there are three levels under the main rep (2, 4, 8). in each level the main Rep (GABE) will get a high commission per sale if the levels are filled up (20%, 40%, 50%). the thing is, each level isnt activated until it is completely filled. keeping them on the same level will mean it will never be filled and less motivation to push. and a binary graph keeps it organized.
and LISA and MICHAEL are both, ADRIANA's and GABE's sub reps. GABE "hired" ADRIANA who in turn hired LISA and MICHAEL. thats the great thing about a binary graph, it is infinite. that and both GABE and ADRIANA benefit from filling the slots under ADRIANA.
you can have more branches, but for the model we are doing, we only want 2 branches with 14 max sub reps. ill look into the relationship idea you proposed. as you can see, it gets a little confusing but probably a real simple solution.
also in GABEs binary graph, he is the head of it. Just like ADRIANA is the head of hers and so forth. but everyone, except GABE, has someone above them. that is why it is great to get in at the beginning. make a lot of money. :)
I'm familiar with multi-level marketing, but why is it BINARY?
Once Gabe signs up two sub_reps, he can't sign up a third Sub_rep?
That's implied by the limit of just two sub-reps immediately under him and no more.
ah i see what you mean. well once GABE signs up two reps (one on each side) he now has one more person to help him fill in the rest of his downline which in turn is his subreps (ADRIANA or ALEX's) downline as well. its a win win. if Alex turns out to be a dud and doenst recruit anyone, GABE can still fill in the downline which helps both he and ALEX. or GABE can sit back and do nothing and ALEX can fill in the rest with new subreps whom help as well. GABE only gets rewarded up to three levels.