Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Many to Many - range relationship

Featured Replies

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 by Guest

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.

  • Author

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.,

  • Author

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

Your Cases calculations are unstored and cannot be used for the child (portal) side of a relationship to Phones.

Edited by Guest
Corrected poor sentence

  • Author

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.

  • Author

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.

Another way would be to define a reciprocal calculation in the other table, and create a separate relationship in the opposite direction.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.