September 22, 200619 yr 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.
September 22, 200619 yr 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...
September 22, 200619 yr 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.
September 22, 200619 yr 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 ) )
September 22, 200619 yr 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
September 23, 200619 yr 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
September 23, 200619 yr 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