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

Need help with a calculation field

Featured Replies

I am trying to do an autofill field with a calculation that I just can't seem to fight my way through. I have a field "Frequency" and want to calculate the field "TV Channel" I have all the numbers, but can't come up with the syntax. The calculation is mostly "if is >10 but <19.9, then "1", and "if is >20 but <20.9, then "2". But i have to repeat the if/then statement 69 times, as there are 69 possible TV Channels. Any help on where to start this would be greatly appreciated! Thank you.

Hi

this simple calc:

Div ( Frequency ; 10 )

gives you:

1 when frequency is ≥ 10 but < 20

2 when frequency is ≥ 20 but < 30

and so on...

It doesn't quite work out, Daniele ... < 20.9 ... 20.9 produces 2. It may be mistype - your logic works out - but we can only go by what is given us in the post. When MsqedMan says, "The calculation is [color:green]mostly "if is >", that may mean there are exceptions. With 69 channels, a simple Channel lookup table might be a better option.

Hi LaRetta

I assumed that MsqedMan has forgotten some values...and that 20,9 was a typo of 29,9.

Where is 20 ? Where is 30 ? Where are values from 29,9 to 30 ?

So, till he doesn't give us better specifications, the calc can be:

Case(

frequency = Int ( frequency );"we don't know";

Mod ( frequency; 10 ) ≥ 9,9;"we don't know too";

Div ( frequency ; 10 )

)

  • Author

Thanks for the help so far, and as I re read my post, I realized it didn't make much sense. I have attached a file that has the TV Channel numbers and info. what I am trying to do in another database is to be able to enter in a random frequency, and have the TV channel field come back with the TV Channel. So, the calculation I'm trying to do is to see if "Frequency" falls in the range stated by "Band.Low" and "Band.High". I would also like a flag to tell me if I entered a frequency that was very close to the "Audio Carrier", "Chroma Carrier", or "Video Carrier".

Again, thank you for the help.

Tony

RFStuff.fp7.zip

  • Author

I never thought to do this with a relationship. This works great. In my layout I could put a portal showing me the tv channel information. How would I continue this, though, to raise a flag if I choose a carrier frequency? Would I continue to use relationships or would that be a validation? This is the gritty part of FMP that I am not very clear on. Thank you for the help so far!!!

Tony

How would I continue this, though, to raise a flag if I choose a carrier frequency? Would I continue to use relationships or would that be a validation?

Hi Tony

sorry but my english isn't so good... can you repeat your request with other words ?

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.