mr_vodka Posted December 14, 2004 Posted December 14, 2004 Hi all, I am trying to create a sub navigation for a clients' list by using a portal. Lets say for example I have a table where there is a customer, year, make, and model fields. I would like to implement a way so that from a find result by customer, a self join could be used in such a way to create a navigation but with unique values. For example. Customer Table joined to Main Table via id numbers. Customers: Bob, John, Sally Main Table: Record 1 Customer: John Make: Ford Model: Econoline Year: 2000 Record 2 Customer: John Make: Ford Model: F-150 Year: 1999 Record 3 Customer: Bob Make: Nissan Model: Sentra Year: 2003 ---------------------------------------------------- So... If I do the intial find by customer, I will has the 2 records with Customer: John. Now this is where I would like a navigational setup. If I do a self joining portal, I will get "Ford" twice as a field value... Is there a way to just have it be "Ford" once? Eventually I would like it add a button script to it, so that it popups a list of all "Fords" that "John" has. I have done this part already with a many portal. What I am looking for is the navigation of have only one of the same value, maybe in a dropdown etc. TY. -John customers.zip
-Queue- Posted December 14, 2004 Posted December 14, 2004 You can create a value list based on the related Make field, 'including all values starting from' your base Customers table. Then create an unstored calculation field of ValueListItems( Get(FileName); "yourvaluelist" ) or Substitute( ValueListItems( Get(FileName); "yourvaluelist" );
mr_vodka Posted December 14, 2004 Author Posted December 14, 2004 Hi, and thank you for the response. I am not sure if I was completely following you correctly... Anyway, I have added a mock file sample to show you guys what I am talking about... it is in 7 tho. Thanks again. -John
-Queue- Posted December 14, 2004 Posted December 14, 2004 Change your make value list to be based on RT| Self Join Instance::Make and 'include only related values starting from' Retail. Then create a new global text field and format it as a menu, list, or radio button based on the make value list. You don't need the ValueListItems field after all, but just so you know, you would need to enclose the value list name in quotes to get it to work.
mr_vodka Posted December 15, 2004 Author Posted December 15, 2004 -Queue- Thank you very much for the help. Such a simple solution and I couldnt figure it out. Thanks again. -John
mr_vodka Posted December 22, 2004 Author Posted December 22, 2004 A new problem. The customer does not want it to be a value list but rather a portal that is used. So I figured that I would separate the make and model into its own Table. Since Many different customers can own the same make and model as well as, one owner owning different year cars of a particular make/model, I set up the sample like the following: Table 1: Main Data Entry Fields: RecordID CustomerID Year PreviousOwner Trim KeyIDMakeModel <<reference MakeModel: Make>> <<reference MakeModel: Model>> Table 2: MakeModel Fields: CustomerID Make Model c.Concat= CustomerID & Make & Model Relationship Keying on: c.Concat = KeyIDMakeModel I have thought about this and am not too sure how to accomplish this. I can only have one copy of each Model/Make for each customer. That is why a concat calculation field was created. It would be ideal to match on something like this, but the problem is that since it is a calculation field, the field, KeyIDMakeModel from the Data Entry Table, only shows the first field value typed in. When that happens, it no longer becomes a valid relationship. Example: c.Concat= MontanaFordMustang, However, KeyIDMakeModel= Ford, since that was the first value entered. I feel that there must be an easier way of doing this, and maybe I just can not see the answer. I am uploading just a basic file based on the earlier file posting that I put up but the functionality is not the same. cars.zip
-Queue- Posted December 22, 2004 Posted December 22, 2004 I don't think you'll be able to use a portal to display unique makes related to CustomerID unless you create a Customer|Make table and have only one record created for each Customer-Make combination.
Recommended Posts
This topic is 7277 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now