March 24, 200916 yr Hi all, stuck on a portal problem and wonder if anyone out there can help. I am working on a simple workflow management solution. The bit I am scratching my head about is as follows: I have the following tables: contacts, jobs & purchases. A contact can have a job related to it. A job belonging to a customer can have a purchase related to it. I am working on the purchases layout and I am wanting to create a popup 'chooser' window with a portal in it where the user can select a customer (dropdown) and the portal shows only jobs related to the chosen customer . I have made a few attempts at this but am not quite getting the relationship right. Thanks in advance for any help on the subject.
March 24, 200916 yr Richard, Based on your table structure, I am assuming that not all jobs have purchases. Is this correct? But you want to view jobs through a portal on the purchase screen, even if there is no purchase? Is that correct? This little bit of information should clarify your intentions. *susan*
March 24, 200916 yr Author Hi Susan. You are correct in your assumption - not all jobs will have associated purchases. Starting from the purchase screen: I want to give the user the option to press a button to which opens a popup window: which gives the user the facility to select a contact from the dropdown which then filters the results in the portal to only show jobs belonging to that chosen contact. (but as you can see from the above screen shot I haven't got the relationship quite right!)
March 24, 200916 yr Richard, Nice screen shots, but I am still a little confused. I am on the purchase screen, and I can then navigate to a "pop-up" window to select the contact and see the jobs? And that popup window context is purchase? One step at a time! *susan*
March 24, 200916 yr Author Hi Susan, Thanks! The plan is that when the user selects a contact from the contact drop down in the pop up window the jobs being shown in the portal are filtered to only show jobs for that contact and then the user 'picks' the correct job to link the purchase to. I will script a button to do this which sets the JobID_fk in the purchase table to the correct job id. Currently the popup window is showing records from the jobs table. What I have tried (unsuccessfully!) to do is create a global field (g_ContactIDJobsFilter) in the jobs table and created a self-join relationship between g_ContactIDJobsFilter and JobID so by selecting a contact (set in g_ContactIDJobsFilter) it should only show jobs from that contact... but it hasn't worked properly as you can see from the pop-up screenshot
March 24, 200916 yr Richard, Very close, but not quite there. Try this for your relationship: JOB|g_ContactIDJobsFilter == JOB|ContactID *susan*
March 25, 200916 yr Author Hi Susan, Thanks for that, I just noticed that I mate a typo in my previous post: self-join relationship between g_ContactIDJobsFilter and JobID ContactID_fk not JobID, as that is how I had the relationship setup which is basically how you have told me to do it in your last post. I think the problem was probably that I had changed the portal definition so that it took data from a different table occurrence and not actually changed the definition of the fields on the portal so that they came from the same table occurrence. I tried the method in the attached file that "comment" posted and that worked for me. Thanks for all your help!
Create an account or sign in to comment