chris.paschen
Chris Paschen
I've got a usecase that I'm not 100% sure that Fabrik can do.
I've spent a lot of time 'playing' with the various databasejoin options, but can't see exactly how to do this.
Table 1:
UserID
CategoryID
Table 2:
UserRecord (databasejoin using Table1)
The databasejoin needs to be able to lookup the current user - i.e. 'manager' (the person who is adding the record to Table 2) in Table 1 to find out their CategoryID. Then the databsejoin needs to only display those users - i.e. ' team member' (from Table1) who have the same CategoryID as the 'manager' and only make those 'team member's available for selection.
Then the kicker ... IF any user ('team member') changes their CategoryID in Table 1 (in the future) I need them to be removed from the 'manager's entry in Table2 where they don't match. [This could be a batch process if needed] (I do NOT need the system to automatically add them to a different 'manager' record at this point - it could actually just remove all of their records in Table 2 when they change their category).
Other details:
Table 1 is a comprofiler (Community Builder) table, so I can't 'manage' it from within Fabrik (but I can run code there on changing.
The 'kicker' section is just to help see what is the best db structure for Fabrik to make this all happen.
Anyone have ideas on this?
Do you think that it's possible, and if so, what type of db structure would work best?
Thanks for any help.
I've spent a lot of time 'playing' with the various databasejoin options, but can't see exactly how to do this.
Table 1:
UserID
CategoryID
Table 2:
UserRecord (databasejoin using Table1)
The databasejoin needs to be able to lookup the current user - i.e. 'manager' (the person who is adding the record to Table 2) in Table 1 to find out their CategoryID. Then the databsejoin needs to only display those users - i.e. ' team member' (from Table1) who have the same CategoryID as the 'manager' and only make those 'team member's available for selection.
Then the kicker ... IF any user ('team member') changes their CategoryID in Table 1 (in the future) I need them to be removed from the 'manager's entry in Table2 where they don't match. [This could be a batch process if needed] (I do NOT need the system to automatically add them to a different 'manager' record at this point - it could actually just remove all of their records in Table 2 when they change their category).
Other details:
Table 1 is a comprofiler (Community Builder) table, so I can't 'manage' it from within Fabrik (but I can run code there on changing.
The 'kicker' section is just to help see what is the best db structure for Fabrik to make this all happen.
Anyone have ideas on this?
Do you think that it's possible, and if so, what type of db structure would work best?
Thanks for any help.