Anuviel Posted November 5, 2008 Share Posted November 5, 2008 (edited) I have a basic many to many relationship. Ie. Two tables. One table contains phone models and the other contains cases. It is a compatibility checker. One case can fit many phone models. One phone can fit many case models. I have trouble setting up the relationships as my phone fitting factor is a defined range: Case size: HxWxD in mm Case: 103x53x20 Phone 102x51x15 The phone will fit this case. The phone that has dimensions of 100x50x17 will also fit the case. The phone that has dimensions of 98x50x17 will not fit the case as the case will be to big in H dimension. The range is H - 4, W - 3 and D - 5 In other words any phone that has dimensions in range of 103x53x20 to 99x50x15 will fit the case that has dimensions of 103x53x20. The phones that are in the above range, for example, will not fit any cases that have dimensions which are different then 103x53x20. The goal is to display compatible phone models on the Case layout via portal and vice versa. Edited November 5, 2008 by Guest Link to comment Share on other sites More sharing options...
mr_vodka Posted November 5, 2008 Share Posted November 5, 2008 I would start by putting each of those into seperate fields. Height, Width, Depth. Then you can use a preferences table to store the allowed variance and reference it for calcs. In your phone table, create three new calcs. cHeightAdjust ( Height - Prefs::HeightVar ) cWidthAdjust ( Width - Prefs::WidthVar ) cDepthAdjust ( Depth - Prefs::DepthVar ) Now create a relationship keyed on these three fields to the 3 fields in your PhoneCase table. Use the ≤ instead of the = as the operator. Link to comment Share on other sites More sharing options...
Anuviel Posted November 5, 2008 Author Share Posted November 5, 2008 Heh, thanks. I feel so bad now. That is what I did exactly but I messed up, for some odd reason it did not work. I rechecked after seeing your reply and I mapped the relationships wrong. Thank you., Link to comment Share on other sites More sharing options...
Anuviel Posted November 6, 2008 Author Share Posted November 6, 2008 Actually, I have it working but I fail to see and understand why a portal on my Phones Layout is failing to show related records from my Case layout. If anyone could take the time to let me know I would appreciate it. See the portal on the phone layout - that should show related records from cases. The portal on the Cases layout is working fine and is showing records from Phones. Thank you. Size.Check.zip Link to comment Share on other sites More sharing options...
LaRetta Posted November 6, 2008 Share Posted November 6, 2008 (edited) Your Cases calculations are unstored and cannot be used for the child (portal) side of a relationship to Phones. Edited November 6, 2008 by Guest Corrected poor sentence Link to comment Share on other sites More sharing options...
Anuviel Posted November 6, 2008 Author Share Posted November 6, 2008 Aha - got it. Before I hard coded size calc into the case table so the portal worked as the calc could be stored but since I switched to using global fields the calc became unstored and thus the portal stopped working. How would I now go to get that portal in Phones table working? Thank you. Link to comment Share on other sites More sharing options...
Anuviel Posted November 6, 2008 Author Share Posted November 6, 2008 I solved the problem. I just abandoned the idea of preference table and have hard coded the calculation and made it stored so both portals now work. As I am pretty much the only one who will use it (my side business) I see no issue with hard coding it as i can change it on the fly as necessary. Link to comment Share on other sites More sharing options...
comment Posted November 7, 2008 Share Posted November 7, 2008 Another way would be to define a reciprocal calculation in the other table, and create a separate relationship in the opposite direction. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5792 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