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

Multiples of a particular number

Featured Replies

Is it possible to select records based on multiples of a particular number? I want to use this in a Case statement. I currently have

Case (Subject_ID = 3 or 8 or 13 or 23 or 28; "Mathematics")

This works fine. I am just wondering if I can shorten it a bit. What I'd like to do is say "Find every multiple of 5 beginning at 3 and ending at 28." Also, would such a function work with an "or" statement? I want "Mathematics" to appear only if one of the multiples of is true.

Thanks.

dan

I currently have

Case (Subject_ID = 3 or 8 or 13 or 23 or 28; "Mathematics")

This works fine.

I doubt it. This would ALWAYS return "Mathematics".

"Find every multiple of 5 beginning at 3 and ending at 28."

You could try:

Case ( not Mod ( Subject_ID - 3 ; 5 ) ; "Mathematics" )

Or, if the 'ending at 28' condition is significant:

Case ( not Mod ( Subject_ID - 3 ; 5 ) and Subject_ID < 29 ; "Mathematics" )

I want "Mathematics" to appear only if one of the multiples of is true.

I didn't get this part.

Mod() can find multiples of 5:

Case( Subject_ID >= 3 and Subject_ID <= 28 and Mod(Subject_ID-3, 5) = 0; "Mathematics" )

I'm not sure what you mean by "one" of the multiples, is Subject_ID a multi-key value?

I see my post is an exact duplicate.... :)

Edited by Guest

  • Author

Thanks for the responses. I was trying to create a "work-around." I have a series of hierarchical portals and I was trying to "dump" information into a field and then have that field accessible via a portal on another page. See the attached file.

Also, see my related post Topic#188726.

Thanks.

dan

TeacherDB.fp7.zip

  • Author

Can anyone shed some light on why the portal fields "bounce" back to the first portal record?

- dan.

I took a look at your file. Unfortunately, portals are not quite that flexible.

If I have a chain of relationships, with A being the table the layout is based on:

   A - B - C - D - E - F

You can create a portal for table D to put on this layout, and it will show all related records from D. You can also drop fields from B and C into the portal, and they will be the correctly corresponding values for each D record.

But, putting a field from E or F into the portal will only show the first value (for the D record you're looking at). This is similar to how dropping a field for D on the A layout will only show the first value.

Basically, a portal based on table D will have one row for each related record in D, you'll never get any more than that.

Hope this helps.

  • Author

Thanks Shadow. It helps to know that I could not make this work because it was not intended to work that way (hope that makes sense).

Thanks for the reply.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.